Matching rule too strict for UNION
duongphuhiep opened this issue · comments
DUONG Phu-Hiep commented
public class Transaction
{
public byte? type { get; set; }
}
var res1 = from t1 in dataContext.Table1TypeNotNull select new Transaction {type=t1.type}
var res2 = from t2 in dataContext.Table2TypeNullable select new Transaction {type=t2.type}
var resUnion = res1.Concat(res2);
I expected that resUnion should be a "Union" SQL but it is fallbacked to enumerable (execute 2 select separatly then make the union happen in memory)
The cause is that t1.type is (byte) and t2.type is (byte?)
I think that the rule is not reasonable, we would be able to generate a UNION query in my case...