开发者

Inherit in Ado.net Entity Framework

Inherit in Ado.net Entity Framework

I have entity NhanVienQuanLy inherit 开发者_如何学Pythonfrom entity NhanVien.

 var context = new Model1Container();
 var result = context.NhanViens;
 var resultNV = context.NhanVienQuanLys // not exist

How to get data of entity set NhanVienQuanLy?


You should be able to do this:

var resultNV = context.NhanViens.OfType<NhanVienQuanLy>();

or when you query in query syntax:

from n in context.NhanViens where n is NhanVienQuanLy select n;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜