-
Posted by Oleg Sych December 27, 2009 As described on MSDN , ADO.NET Entity Framework is a set of technologies that enables developers to work with data in the form of domain-specific objects and properties, such as customers and customer addresses without having to concern themselves with the...
-
One of the things that we are continuously working on improving is the quality and the readability of the SQL generated when querying using the Entity Framework. We have already made some improvements in .NET 4.0 Beta 1, and we are working on more for .NET 4.0 post Beta 1. Most of the improvements we...
-
Code Only There are currently two ways to get Entity Framework apps up and running, we call these Database First and Model First respectively. Database First has been with us since .NET 3.5 SP1, and involves reverse engineering an Entity Data Model from an existing database. Model First is new to Visual...
-
In V1 of the Entity Framework it is possible to annotate a schema using attributes declared in another XSD. However XML attributes are a very limited form of annotation. It would be better if we could annotate using full elements. This is what we are calling Structural Annotations. This feature will...
-
I have spent a fair amount of time already trying to improve my experience with the Entity Framework with versions 1.0, 2.0 and 3.0. Well that’s a bit of joke really because there was and never will be versions 2.0 or 3.0 for the Entity Framework with the decision to take the next version straight to...
-
In my previous article, I described a foundation on which you can build successful n-tier applications, focusing mainly on anti-patterns to avoid. There are many issues to consider before making decisions about the design of an n-tier application. In this article, I examine n-tier patterns for success...
-
David Hill, in his preface to the latest patterns & practices Architecture Guidance, jokes that the key to being a good architect is learning to answer "It depends" to most questions. In this article, I'll take that joke to heart. How can you use the Entity Framework with your application...
-
The whole point of us using T4 for code-generation is that it makes it easy to customize the generated entities. A good example might be to support some sort of validation when setting string properties. To illustrate lets re-use the code from the recent POCO template walkthrough post . In that project...
-
I certainly have not yet explored the depths of EF4 to the same extent as I have with the current version and I have a lot of discoveries ahead of me. Thanks to a tweet this morning by Zekq , I finally saw one of the promised improvements to EF’s stored procedure support. In EF v1, you can easily create...
-
Last summer Microsoft released the first version of the ADO.NET Entity Framework as part of .NET 3.5 Service Pack 1. It builds on the concept of Dr. Peter Chen’s Entity Relationship Model by introducing a conceptual model, called the Entity Data Model (EDM), which sits on top of the database schema to...
-
当我们设置Kigg底层使用Entity Framework提供者时,无法删除一个文摘。对StoryService.cs文件进行如下修改: public virtual void Delete(IStory theStory, IUser byUser) { Check.Argument.IsNotNull(theStory, "theStory"); Check.Argument.IsNotNull(byUser, "byUser"); using...
-
默认情况下,Kigg的web.config中配置底层使用LINQ to SQL仓储进行数据库操作。Kigg 2.5引入了仓储提供者概念,当前支持使用Entity Framework仓储、MySQL仓储。以下是快速配置Kigg使用Entity Framework仓储的实践: 第一步,将安装目录下SharedFiles子目录中的EF数据模型文件(CSDL、SSDL、和MSL)拷贝到App_Data目录下去。包括: DomainObjects.csdl (此文件应该只读,别修改它) DomainObjects.msl (此文件应该只读,别修改它) DomainObjects.ssdl (默认SSDL目标为SQL...
-
MSDN上最近发表了一篇Elisa Flasko著的文章,比较了LINQ to SQL与LINQ to Entities适用的场景: Introducing LINQ to Relational Data http://msdn2.microsoft.com/en-us/library/cc161164.aspx 作者指出,LINQ to SQL主要的应用场景是针对微软SQL Server数据库的快速开发,这些应用的对象模型与数据库中数据定义的结构间非常类似,几乎有一一对应的映射关系,这样你可以使用LINQ to SQL把一些数据表直接映射到.NET类,数据字段映射到的相应的.NET类的属性上...
-
Taking on two new technologies - ASP.NET MVC and the Entity Framework - at the same time was bound to provide some "interesting" moments. Getting data out via EF has so far been pretty straightforward. But when it got to building the back end of my site, I had some fun trying to manage INSERTS...
-
Building on my previous article , which looked at adding data with one-to-many and many-to-many relationships via the Entity Framework, here's a look at how to modify that data within an ASP.NET MVC application. To recap, I am in the process of migrating this site from ASP.NET Web Forms to the MVC...