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

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

问题描述

我正在寻找一个使用具有POCO的实体框架(即不使用设计器)使用MySQL作为后端的实用教程。我正在寻找一些半深度覆盖类似属性的东西(例如如何将数据库表/字段名映射到不同的类/字段名称)。另外我正在寻找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.

对于POCO,您要对映射进行编码,然后假设您使用最近已经退回的EF 4 Futures CTP 5使用设计师,这正是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 4 POCO支持,或EF CTP5中的POCO模板,那些应该是有帮助的如下:

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

http://thedatafarm.com/blog/data-access/agile-entity-framework-4-repository-part-1-model-and-poco- classes / (整个系列)
通常 http://thedatafarm.com/blog/search?q=poco 或页面太慢 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

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

如果您仅使用代码,您需要意识到它是预发行的,并且有一些工作时使用。

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天全站免登陆