使用实体框架,POCO最好的教程,和MySQL [英] best tutorial for using the entity framework, POCO, and MySQL

查看:414
本文介绍了使用实体框架,POCO最好的教程,和MySQL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用MySQL作为后端寻找一个坚实的教程使用实体框架与POCO(即不使用设计师)。我寻找的东西是半深度覆盖类的东西属性(比如如何数据库表/字段名映射到不同的类/字段名)。我也是在寻找C#,VB不会。有谁知道任何此类教程?

I am looking for a solid tutorial on using the Entity Framework with POCO (ie. not using the designer) using MySQL as the back-end. I am looking for something that is semi-in-depth covering stuff like attributes (like how to map a database table/field name to a class/field name that is different). Also I am looking for C#, not VB. Does anyone know of any such tutorials?

推荐答案

有关EF的MySQL,检查该另一个问题:结果
使用MySQL与实体框架结果
基本上,你需要从MySQL获得一个连接器,并从那里正常工作。

For EF with MySQL, check this other question:
Using MySQL with Entity Framework
Basically you need to get a connector from MySQL and work normally from there.

有关波苏斯,要么你做code中的映射,然后我假设你使用EF 4期货CTP 5日前releaed,或者您使用设计的,这就是通常是EF 4。

For POCOs, either you do code the mappings, and then I assume you use EF 4 Futures CTP 5 recently releaed, or you use the designer, and this is what is normally in EF 4.

如果该意思是默认的EF POCO 4的支持,或EF CTP5 POCO模板,这些应该是有帮助的内容如下:

If the meant is default EF 4 POCO support, or POCO template in EF CTP5, those should be helpful reads:

<一个href=\"http://thedatafarm.com/blog/data-access/agile-entity-framework-4-repository-part-1-model-and-poco-classes/\">http://thedatafarm.com/blog/data-access/agile-entity-framework-4-repository-part-1-model-and-poco-classes/ (整个系列)
一般来说 http://thedatafarm.com/blog/search?q=poco 或页面是否太慢<一个href=\"http://www.google.com.au/#q=poco+site:thedatafarm.com\">http://www.google.com.au/#q=poco+site:thedatafarm.com

http://thedatafarm.com/blog/data-access/agile-entity-framework-4-repository-part-1-model-and-poco-classes/ (the entire series) Generally http://thedatafarm.com/blog/search?q=poco or if page is too slow http://www.google.com.au/#q=poco+site:thedatafarm.com

<一个href=\"http://blogs.msdn.com/b/adonet/archive/2009/05/28/poco-in-the-entity-framework-part-2-complex-types-deferred-loading-and-explicit-loading.aspx\">http://blogs.msdn.com/b/adonet/archive/2009/05/28/poco-in-the-entity-framework-part-2-complex-types-deferred-loading-and-explicit-loading.aspx
http://blogs.msdn.com/b/adonet/archive/2009/06/10/poco-in-the-entity-framework-part-3-change-tracking-with-poco.aspx

http://blogs.msdn.com/b/adonet/archive/2009/05/28/poco-in-the-entity-framework-part-2-complex-types-deferred-loading-and-explicit-loading.aspx http://blogs.msdn.com/b/adonet/archive/2009/06/10/poco-in-the-entity-framework-part-3-change-tracking-with-poco.aspx

如果您使用的是code只有这样,你需要认识到这是pre-释放,有一些问题时。

If you are using the code only way, you need to realize it's pre-release and has some issues when working with.

这篇关于使用实体框架,POCO最好的教程,和MySQL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆