Entity Framework FAQs Success with Wiki

I won’t bore everyone with daily updates, but I went to check my Hotmail account where Entity Framework FAQs wiki updates get posted, and found that on Friday, 2 people had changed 13 pages of the FAQs.

The site had only been publicly announced one day before! This was exactly the result we were hoping for: prior to moving to the wiki, the site had been stagnant for a number of months.

A big thank you to the two folks who contributed!

If you have questions that you think belong in the Entity Framework FAQs, why don’t you go here and see about adding them. Or check out the answers that are already there: maybe they will solve a problem you have. Or perhaps you know something that ought to be added.

The wiki is for the Entity Framework community, so feel free to jump in and contribute!

Posted in FAQs, wiki | Leave a comment

Entity Framework FAQs website moved to Technet wiki

The move was completed yesterday. The Frequently Asked Questions are now at: http://social.technet.microsoft.com/wiki/contents/articles/entity-framework-faq.aspx

Feel free to browse, and, since it’s a wiki, to contribute. If you have ideas for new questions, you can even add them to the site yourself, and hopefully someone will soon address them.

The FAQs reflect EF version 4.o, which is two releases ago: I just ported over  what was on the original EF FAQs web site that Danny Simmons, who used to be on the EF product team, had built. I took it as it was, except that I fixed  a few syntax errors, and updated stuff that I could do quickly. I also changed the information about how to contribute to the site, to reflect that it’s now a wiki (I also need to update the FAQs to acknowledge Danny’s work in creating the earlier site). The FAQs obviously needs newer content added, so if you can contribute, have at it!

How do you get started contributing?

Go here.

It’s very easy, you just register and it’s done: no waiting for permission or anything. There are two simple steps:

  1. Sign up for a Live Windows ID, which you might already have
  2. Give yourself a “Display Name”

There’s also an explanation of how to sign up included in the Entity Framework FAQs.

 Why did we move the FAQs from the existing web site to the Technet wiki?

Two reasons:

  1. We wanted to make it easy for people in the community to contribute directly to the FAQs: you who use Entity Framework in your work are the ones who have the most experience with it, so often you will have answers, and will know what issues caused you the most trouble. The wiki format is ideal for enabling community people to easily contribute directly.
  2. I and my predecessor, Danny Simmons, became a bottle-neck for maintaining the earlier site. As is often the case at Microsoft and other hi-tech firms, we have constant new demands on our time and changing responsibilities. Moving the site onto a wiki removes us permanently as bottle-necks.

I will be getting emails about updates to the FAQs, but these emails won’t require any approval by me. They will enable me to see if perhaps I should run something by the product team for technical accuracy or perhaps more detail.

What are some ideas for new questions that should be answered?

The FAQs site contains no information about the EF 4.1 release, or the recent June CTP release. So obviously there are a host of questions about dbContext and code-first just waiting to be answered.

Other ideas may not be so obvious to us here at Microsoft, but might be issues that people run into when first learning about Entity Framework. This is one of my own special interests: people who have used a technology for a while develop a lot of implicit knowledge, and unspoken assumptions about what other people already know, that are hard to identify. Often these turn out to be significant stumbling blocks in learning a new technology. We’d love to get those stumbling blocks identified and made part of the FAQs.

Finally, this may be an obvious point, but the FAQs are in no way a replacement for the Entity Framework forums. Any question at all can go into the forums. But for the FAQs, we want questions that are more general, issues that you would expect many people to run into.

Posted in Entity Framework, FAQs | Leave a comment

Entity Framework FAQs Moving

We have decided to use Microsoft’s Technet Wiki site to host the Entity Framework FAQs web site.

There are two main reasons for this:

  • the current build process for the site is difficult to understand (for me at least), but more importantly:
  • the FAQs site ought to be a community resource, and members of the Entity Framework community ought to be able to contribute to it easily, without going through a “single person bottleneck”, which I and my predecessor were.

Now, the only thing you have to do in order to contribute is go here (http://social.technet.microsoft.com/wiki/contents/articles/129.aspx) and sign up. What this consists of is getting a Windows Live ID, and registering a Display Name so you can earn “points”, which count towards attaining MVP status, if that is of interest to you.

Once you do that, you are good to go, and can edit and create wiki topics at will. If you haven’t worked with wikis before, the above link has further links that will introduce you to the process. This is my first experience working with wikis, as opposed to just reading them, and as a writer, I’m liking it a lot! Hopefully you will too, and will have some unique insights (or questions) to add to the site.

When the move is complete, I’ll post the new url.

Posted in Entity Framework, FAQs | Leave a comment

SQL Azure and Entity Framework Connection Fault Handling

There’s a great blog posting by James Podgorski on the MSDN App Fabric Customer Advisory Team blog site, called SQL Azure and Entity Framework Connection Fault Handling.  James provides some background, and then goes through three scenarios, with code samples, and SQL Profiler print outs.

SQL Azure connections are, naturally, just like regular SQL Server connections, but with a few added caveats. And there are some things to think about when you handle them in an Entity Framework application. James goes through this in nice detail.

Posted in Connections, Entity Framework, SQL Azure | Tagged , , , , , , , | Leave a comment

Erratic Blogging

Seems to be an occupational hazard for some folks at MSFT. I start out swearing I’ll blo… (cont) http://deck.ly/~Vy9NG

Posted in Entity Framework | Leave a comment

Entity Framework 4.1 Released

Entity Framework 4.1 released on 4/12 http://bit.ly/dL4Ffi Our docs are under “Getting Started” -> MSDN Documentation

Posted in Entity Framework | Leave a comment

How to Find the Version of SQL Server that is Running?

My colleague Jason has posted a great entry (with a video) on how to determine what version(s?) of SQL Server you have running, at

Find your Installed SQL Server Versions and Instances.

What’s especially nice about the posting is that it combines together in one place all the different ways of determining the version number. This information is available in the official documentation, but is scattered in separate places, so it is a real service to have it all brought together. Plus it links to a listing that translates the version number into the name by which it is commonly known.

Highly recomended, enjoy!

 

Posted in SQL Server | Tagged , , , | Leave a comment

Updated Version of “What is Entity Framework”?

I’ve received feedback that lets me correct a few errors in my original draft that I posted (https://ricksaling.wordpress.com/2011/01/14/entity-framework-code-first-release/). I’ve incorporated most of the feedback, so here’s the result.

This topic is designed to answer two questions:

  • What is Entity Framework, in a nutshell
  • What are its major components, one level down?

This topic is the top node in the MSDN documentation for the upcoming “Code-First” release.


Entity Framework

This release of Entity Framework introduces a new “productivity api”, and enables ”Code First” development. For more information, see What’s New

The Entity Framework is an “Object-Relational Mapper”, which reduces the “impedance mismatch” between the object-oriented world of .Net developers, and the world of relational databases. It enables developers to primarily interact with an application’s conceptual model, using familiar object-oriented techniques. In the Entity Framework you can work with data in the form of domain-specific objects and properties, such as customers and customer addresses, without having to concern yourself with the underlying database tables and columns where this data is stored. Developers can issue data access operations against the conceptual model, and EF takes care of translating the operations into relational database actions.

Overview

There are two major layers in an Entity Framework application:

  1. The modeling layer; and
  2. The object layer.

The modeling layer contains three components:

  1. A conceptual model consisting of domain-specific entity types and relationships, based on an Entity Data Model (EDM);
  2. a database schema that defines tables and relationships; and
  3. a mapping between the conceptual model and the database schema.

The Entity Framework uses the mapping component to transform operations against entity objects such as create, read, update, and delete, into equivalent operations in the database.

The Entity Framework object layer contains typed Common Language Runtime (CLR) objects, which reflect the entities and relationships defined in the conceptual model. These objects can be consumed by programming languages. The exact format of the types is controlled by options you provide to the Entity Framework.

Mapping and Modeling

There are three different ways to create the mapping layer and the object layer.

  1. “Database First”: starting with an existing database, generate a conceptual model from it, using the Entity Data Model Tools. In this case a default conceptual model and mapping are generated, which you can customize using the Entity Data Model Designer. For more information, see Tutorial: Creating a Conceptual Model from an Existing Database using Tools.
  2. “Model First”: graphically create a conceptual model first, using the Entity Data Model Designer, and then generate a database based on the metadata built by the tool from that model. For more information, see Tutorial: Creating a Conceptual Model using Tools .
  3. “Code First” (new in this release of Entity Framework): define your object model in code. The Entity Framework supports 2 scenarios:
    1. It can infer a conceptual model based on the object types and additional configurations that you define. The mapping metadata is generated during runtime based on a combination of how you defined your domain types and additional configuration information that you provide in code. The Entity Framework generates the database as needed based on the metadata..
    2. You can map your object layer directly to an existing database.

For more information, see Tutorial: Creating a Conceptual Model using Code and Mapping and Modeling a Conceptual Model .

Working with Objects

The Entity Framework object layer provides facilities to do the following:

  1. execute queries against the conceptual model;
  2. materialize data returned from the data source as objects;
  3. track changes that were made to the objects;
  4. propagate object changes back to the data source; and
  5. bind objects to controls.

In this Section

What’s New

Mapping and Modeling a Conceptual Model

Applying Additional Configurations to a Conceptual Model

Working with Entities

Querying with LINQ to Entities

See Also

ADO.NET Entity Framework


Posted in Code-First, CTP5, Entity Framework | Tagged , , , , | 1 Comment

Entity Framework FAQs Web Page

There is a Frequently Asked Questions (FAQs) web page for Entity Framework that has a lot of great information, at http://www.ef-faq.org . It’s a good place to go when you are first getting started with Entity Framework, since the questions you have are likely shared by others, and so may already be answered for you at this site.

I’ve just agreed to manage this web site, so if you have questions that you think ought to be in the FAQs, just add a comment to this posting.

The web site is an open-source project hosted at http://effaq.codeplex.com.   There is a list of non-content format-related issues (HTML , CSS, web site architecture) at http://effaq.codeplex.com/workitem/list/basic.

Another way to add questions is to join the project, and create a build that includes your questions, notify me, and I will handle merging in your code. The project homepage gives you the information you need to do this. Since it’s open source, you could also make a fix for one of the work items the same way.

I’ll be ramping up this week and next, and then will likely address some of the minor fixes in the work item list just to get familiar with the build process. After that, one high priority fix is to go to a single-question-per-page format, to improve page discoverability by search engines such as Bing and Google.

Again, feel free to post proposed FAQs. It’s notable that none of the existing FAQs address Code-First development or other new features in the CTP5 release of Entity Framework: surely there must be some questions out there. It’s also likely possible that some of the answers may have broken due to new releases, or there are better solutions available with the new simplified “productivity api”.

Posted in Entity Framework, FAQs, Getting Started | Leave a comment

Entity Framework (Code-First Release)

This is a preview of the top-level MSDN topic for the new “Code-First” release of Entity Framework. The goal of this topic is to give a very high-level overview of Entity Framework, and to mention briefly what’s new (there is a separate “What’s New” topic that I’ll post next week, most likely).

Note that none of the links work, and the formatting is a bit off because the content has gone directly to the web (via this blog) rather than through Microsoft’s publishing process for MSDN.

You can post feedback in the comments section, and I will consider incorporating parts of it in the final version of this topic, if appropriate.

Entity Framework (Code-First Release)

This release of Entity Framework introduces a set of enhancements and features that increase productivity and enable ”Code First” development. For more information, see What’s New
The Entity Framework is an “Object-Relational Mapper”, which is intended to reduce the “impedance mismatch” between the object-oriented world of .Net developers, and the world of relational databases. It enables developers to primarily interact with an application’s conceptual model, using familiar object-oriented techniques. In the Entity Framework you can work with data in the form of domain-specific objects and properties, such as customers and customer addresses, without having to concern yourself with the underlying database tables and columns where this data is stored. Developers can issue data access operations against the conceptual model, and EF takes care of translating the operations into relational database actions.
Overview
There are three major data components in an EF application:
1. A conceptual model consisting of domain-specific entity types and relationships, based on an Entity Data Model (EDM);
2. a database schema that defines tables and relationships; and
3. a mapping between the conceptual model and the database schema.
The Entity Framework uses the mapping component to transform operations against entity objects such as create, read, update, and delete, into equivalent operations in the database layer.
Entity Framework generates a run-time object layer by transforming the types and relationships defined in the conceptual model into typed Common Language Runtime (CLR) objects, so that they can be consumed by programming languages. The exact format of the generated types is controlled by options you provide to the Entity Framework.
Mapping and Modeling
There are three different ways to create the conceptual model, the database schema, and the mapping between them.
1. “Database First”: starting with an existing database, generate a conceptual model from it, using the Entity Data Model Tools. In this case a default conceptual model and mapping are generated, which you can customize using the Entity Data Model Designer. For more information, see Tutorial: Creating a Conceptual Model from an Existing Database using Tools.
2. “Model First”: graphically create a conceptual model first, using the Entity Data Model Designer, and then generate a database based on the metadata built by the tool from that model. For more information, see Tutorial: Creating a Conceptual Model using Tools .
3. “Code First” (new in this release of Entity Framework): define your object model in code. The Entity Framework will infer a conceptual model based on the object types and additional configurations that you define. The mapping metadata is generated during runtime based on a combination of how you defined your domain types and additional configuration information that you provide in code. The Entity framework generates the database as needed based on the metadata.. For more information, see Tutorial: Creating a Conceptual Model using Code and Mapping and Modeling a Conceptual Model .
Working with Objects
Entity Framework provides tools that automatically generate an object layer based on the conceptual model. The object layer code contains definitions of classes corresponding to the entity types, and an object context, which is a container for in-memory objects.
The Entity Framework object layer provides facilities to do the following:
1. execute queries against the conceptual model;
2. materialize data returned from the data source as objects;
3. track changes that were made to the objects;
4. handle concurrency;
5. propagate object changes back to the data source; and
6. bind objects to controls.
In this Section
What’s New
Mapping and Modeling a Conceptual Model
Applying Additional Configurations to a Conceptual Model
Working with Entities
Querying with LINQ to Entities
See Also
ADO.NET Entity Framework

Posted in Code-First, CTP5, Entity Framework | Tagged , , , , , , | 1 Comment