我确实升级到了 EF 6,但我不知道如何迁移这种情况,如何使用SQLQuery
和OFType
?
//work - return more than 3000 registers
var a = db.AccountBase.OfType<Payable>()
//doesn't work - return 0 register
var a = db.AccountBase.SqlQuery(Utils.Query(param, "AccountBase")).OfType<Payable>()
//not compile - ok
var a = db.AccountBase.OfType<Payable>().SqlQuery(Utils.Query(param, "AccountBase"))