官术网_书友最值得收藏!

Chapter 4. Modeling BrewHow in EF5

If you're developing a new application, Microsoft would very much like you to use Entity Framework 5.0 (EF5). Entity Framework is Microsoft's officially supported Object-Relational Mapping (ORM) tool, finally coming on its own after a much maligned introduction with .NET 3.5 SP1.

As with any ORM, Entity Framework is designed to separate the domain model of an application from the actual storage mechanism. This allows the developer to focus on the actual problem they're trying to solve and spend less time worrying about the tables and columns underneath the model.

Having a framework provide the underlying storage mechanism does have its own set of issues. As almost any DBA will tell you, ORMs will often generate substandard storage models and Entity Framework is not excluded from this issue. However, Entity Framework allows you to customize the translation between the domain and database to match almost any conceivable underlying data store, allowing you and your DBA to work in relative harmony.

In this chapter, we will create the persistence layer for the BrewHow app using Entity Framework 5. We will explore migrations and how we can use them to apply and remove changes to the database. Additionally, we will look at some of the conventions and configurations used by Entity Framework 5.0 to tailor our model to a database mapping we or our DBA prefer.

主站蜘蛛池模板: 合山市| 濮阳市| 客服| 五大连池市| 南丹县| 平谷区| 宜春市| 龙泉市| 平潭县| 敦煌市| 东丽区| 白银市| 城口县| 高碑店市| 五家渠市| 三亚市| 如东县| 张掖市| 察哈| 会东县| 句容市| 雅安市| 修武县| 阿图什市| 泰安市| 莱阳市| 获嘉县| 卢湾区| 桐乡市| 黎川县| 嘉定区| 正镶白旗| 固始县| 永登县| 东丰县| 双辽市| 五常市| 二连浩特市| 乌苏市| 和平区| 宿州市|