Code Only – Further Enhancements

We’ve come a long way since the last post on Code-Only. So it’s high time for another update. We’ve been working really hard on Code-Only revving the design, and spotting missing capabilities and responding to feedback both internal and external etc.  The current plan still holds.  Code-Only will not be in .Net 4.0 with the…

43

Extending the Entity Framework Provider Model to support DDL

As part of the first previews of Code-Only we shared some code to create a database: // Create a context using code-only using (var mycontext = builder.Create(dbConnection)) {     // Create the database if it doesn’t already exist     if (!myContext.DatabaseExists())         myContext.CreateDatabase();     // Standard EF code goes here. } But in the first…

7

Custom CUD Walkthrough for LINQ to SQL to Entity Framework Metadata Conversion Template

Introduction After completing the WidgetFactory walkthrough, you may be wondering how to convert stored procedures and customized insert, update and delete functions. This walkthrough will show you how to convert an application with a stored procedure and customized insert, update and delete stored procedures to Entity Framework using the conversion template. (For more information on…

2

Widget Factory Walkthrough for the LINQ to SQL to Entity Framework Metadata Conversion Template

  Introduction This walkthrough is designed to show you how the new dbml to edmx conversion template can help you to start the conversion process. The conversion template is not yet complete, but can be used to convert basic projects like the one in this walkthrough.   Background There are several differences between LINQ to…

0

LINQ to SQL to Entity Framework conversion template

Many customers have asked us how to port a LINQ to SQL application to the Entity Framework. In order to make this process easier, we have developed a metadata conversion template. This template converts LINQ to SQL metadata (.dbml) to metadata compatible with Entity Framework (.edmx). While not a complete solution to the conversion problem,…

12

Code Only Enhancements

We’ve been working hard on Code Only since the first preview. In the next release you will be able to specify: Navigation Property Inverses. Property Facets, like Nullability, MaxLength, Precision etc. Property to Column mappings Type to Table(s) mappings Inheritance strategy Encapsulate configuration The rest of this post will drill into each of these features…

30

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 Studio 2010/.NET 4.0 and allows…

32

Self-Tracking Entities in the Entity Framework

Background One of the biggest pieces of feedback we received from the N-Tier Improvements for Entity Framework post as well as other sources was: “low level APIs are great, but where is the end-to-end architecture for N-tier and the Entity Framework?”.   This post outlines some of the additional feedback we’ve received and describes the…

73

Foreign Keys in the Entity Framework

Background A number of months ago we asked whether Foreign Keys (FKs) in Conceptual and Object models were important. The feedback we got indicated that there are a real mix of opinions on the topic. Some people are all for them while others think that FKs pollute the conceptual model. The fact that our customers…

43

Customizing Entity Classes in VS 2010

When VS 2010 ships it will include some significant improvements to our code generation story for the Entity Framework. The basic idea is to make use of T4 templates for code generation and ship strong integration into the Entity Framework Designer to make the experience of customizing those templates as seamless as possible. Below Sanjay…

29