Learn ADO.NET Entity Framework 4 – Free Tutorials

The ADO.NET Entity Framework (EF) is an Object/Relational mapping (ORM) framework and is a set of technologies in ADO.NET, for developing applications that interacts with data.

I recently started a new series on Entity Framework 4.0 on DotNetCurry.com. If you are interested in learning Entity Framework 4.0, I recommend you bookmark this post and check out the tutorials. Here are some of the tutorials I have already written:

Entity Framework 4.0 FAQ – Getting Started Guide - In this article, I introduce Entity Framework 4.0, the history behind this framework and why it has become the recommended LINQ-based Data Access technology over LINQ To SQL

Create an Entity Data Model From a Database - In this article, I demonstrate how to create our first Entity Framework application using Visual Studio 2010. We will create an Entity Data Model (EDM) from an existing database.

Exploring how the Entity Data Model (EDM) Generates Code and Executes Queries - In this article, I explain what happens behind the scenes in the Entity Data Model and also look at the files responsible to generate the code and execute queries on your behalf.

Model-First Development in Entity Framework 4.0 - Create a Database from a Model - Developers who practice the Domain-Driven Development (DDD) style create a conceptual model first. The idea is to design the application based on a model. EF 4.0 supports creating the model first and generating a database from the model and in this article, I have shown you how to do model-first development.

Create an Entity Framework Model and Use it in Multiple Projects - This article shows the steps required to create an Entity Data Model which can be used in multiple projects.

Add, Update and Delete Objects in Entity Framework 4.0 - In this article, we will see how to Add, Update and Delete objects in our conceptual Entity model and push the changes to the underlying database.

Bind Entity Framework 4 Model to ASP.NET GridView
- In this article we will see how to bind an Entity Framework model that has been created in a different project, to an ASP.NET GridView.

Profiling and Logging Entity Framework Queries
- In this article, we will see how to log the SQL queries that get generated by Entity Framework. We will also some see profiling tools available.


Bookmark this post and stay tuned for more tutorials on Entity Framework 4.0. Please retweet this post to let fellow developers know about this series. Thanks!






About The Author

Suprotim Agarwal
Suprotim Agarwal, Developer Technologies MVP (Microsoft Most Valuable Professional) is the founder and contributor for DevCurry, DotNetCurry and SQLServerCurry. He is the Chief Editor of a Developer Magazine called DNC Magazine. He has also authored two Books - 51 Recipes using jQuery with ASP.NET Controls. and The Absolutely Awesome jQuery CookBook.

Follow him on twitter @suprotimagarwal.

11 comments:

Anonymous said...

Thanks for sharing that. :)

But before working through it I got one simple question:

What happens if I update my database (tables)? In which way is the ORM affected, is it possible to refresh the mapped model?
For example if I add a column to a table, do I have to rebuild the entire ORM? What mechanisms are interesting concerning this "problem"?

Suprotim Agarwal said...

In response to your question, please read my article http://www.dotnetcurry.com/ShowArticle.aspx?ID=606 and look out for the Entity Designer Database Generation Power Pack which resolves your issue.

By the way, you have a "Update Model from Database" feature in the EDM designer.

Anonymous said...

Thank you.

It makes fun reading your articles. Very well formulated.

Thank you again! :)

Suprotim Agarwal said...

You are welcome 'anonymous'. I wish you had left your name. This way, I would remember you when you posted a question again :)

Anyways I am glad that you like the articles!

Timm Krause said...
This comment has been removed by the author.
Timm Krause said...

Better?! :) Hope my email address is hidden.

I guess the query within the C# code you've written in the second tutorial is LINQ to Entities and not Entity SQL. Is this correct? First googling told me, that Entity SQL looks more or less like T-SQL.

Just to get the difference clear.

Suprotim Agarwal said...

Timm: Yes that's better! Ok now there are 3 ways you can query the EDM. LINQ to Entities, EntitySQL and EntityClient provider. It is correct when you say that EntitySQL looks similar to T-SQL. Infact, it was the original language to query EDM objects. But when it comes to code elegance, LINQ to Entities is the preferred choice, atleast for me.

Timm Krause said...

How have you learned LINQ to Entities? Simply run through the corresponding MSDN pages?

What's the best and fastest way learning LINQ?

Suprotim Agarwal said...

I would suggest you to start with the Free LINQ Samples

If you plan on investing in a good EF book, I suggest Programming Entity Framework: Building Data Centric Apps with the ADO.NET Entity Framework by Julia Lerman.

I have also written some LINQ queries over here http://www.devcurry.com/search/label/LINQ

Krishnan Narayanan said...

Hi Suprotim,

Your articles on EF 4.0 was simple, crisp and to the point. It was really helpful to get an insight of this new feature. Thanks a ton for that and request you to continue writing more such articles for the fellow upcoming developers like me.

Many thanks
Krishnan Narayanan

Suprotim Agarwal said...

Thanks Krishnan. Yes, I plan to write new articles on EF. So stay tuned!