实体框架6:使用EntityDataSource进行绑定?

时间:2015-05-26 18:28:03

标签: c# asp.net entity-framework

我有一个数据库优先的EDMX Datamodel。 我正在使用EF6的新Microsoft.AspNet.EntityDataSource控件绑定到DevExpress控件&利用丰富的设计时功能。 (例如aspxgridview中的自动列生成,基于数据源模式)

使用EF6数据源 enter image description here

然后在GridView Designer中,不会从Schema填充FieldNames。 enter image description here



在他的回答中,罗文米勒说:

  

我们不再建议将实体数据源用于新项目

EntityDataSource and Entity Framework 6

...那么有更好的数据源类型可供使用吗? 用EF6进行这种绑定的正确方法是什么?

1 个答案:

答案 0 :(得分:0)

我从Entity DataSource not working with Entity Framework 6 Upgrade学到了如何获得与EntityFramework 6一起使用的新EntityDataSource,并按照那里的说明将旧的EntityDataSource从工具箱中删除给设计器,然后根据Sergey的回答进行更改和LMK的评论。

然后,您可以继续使用设计器或标记中的EntityDataSource。