开发者

ASP.NET MVC 3 and the Entity Framework with MySQL and LINQ

开发者 https://www.devze.com 2023-02-19 02:54 出处:网络
I have downloaded开发者_如何学运维 ASP.NET MVC 3 and I am now ready to use a MySQL database as my source of data.

I have downloaded开发者_如何学运维 ASP.NET MVC 3 and I am now ready to use a MySQL database as my source of data.

I have understood that the Entity Framework will allow me to abstract the actual sql-business out, and I can wrap my linq queries in a repository pattern. I have tried to follow http://pattersonc.com/blog/2009/04/01/using-mysql-with-entity-framework-and-aspnet-mvc-%E2%80%93-part-i/ but when I get to the place reading

var result = from p in mySqlEntities.ProductSet select p;

I realize that I don't have such a ProductSet.

So, is this the right way of doing things, or is there some easier or more preferable way?


Every entity in the Domain Model will have a set, you might not have a 'product' set but if you had a product table, it definitely would.

0

精彩评论

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