More Entity Framework Tutorials for ASP.NET Developers

The second series of Entity Framework tutorials, Continuing with the Entity Framework and ASP.NET, has been published on the ASP.NET site. The tutorials build on the sample application that the first series, Getting Started with the Entity Framework, explains how to build. You can download a Visual Studio project that is a finished version of the first series or a finished version of the complete first and second second series.

Here is an outline of topics covered in this series:

  • Using the ObjectDataSource control: part 1, creating a simple repository class for basic CRUD operations.
  • Using the ObjectDataSource control: part 2, creating a business logic class and unit tests.
  • Using the ObjectDataSource control: part 3, sorting, filtering, and grouping.
  • Handling concurrency conflicts with the Entity Framework in an ASP.NET application.
  • Maximizing Entity Framework performance in an ASP.NET application.
  • What’s New in the Entity Framework 4.

Like the first series, this one builds a Web Forms example, but much of the content applies equally to MVC, especially the last three in the series (on concurrency, maximizing performance, and new features in Entity Framework 4). We are currently working on an MVC series that builds a similar application using MVC 3, POCO, and code-first development.

Also like the first series, we are looking for feedback, and you can post your comments either here or in the ASP.NET Entity Framework forum.

-- Tom Dykstra
ASP.NET User Education
This posting is provided "AS IS" with no warranties, and confers no rights.


Comments (16)
  1. KristoferA says:

    FYI – in addition to the EF forum on, there is also a forum dedicated to EF on MSDN for those who have questions about EF4:…/threads

  2. mvc says:

    what is the expected date for MVC 3 series ?

  3. Terrence says:

    Can't wait for the MVC 3, POCO, and code-first development post.  I love this new technology combination.

  4. NickS says:

    I too eagerly await the MVC-centric series.  I'd particularly like to see the following topics covered:

    1. EF 4 & MVC 2/3 when working with POCOs derived from the ADO.NET C# POCO Entity Generator template.

    2. Using the repository pattern in conjunction with EF and the generated POCOs, using a DI container for unit testing, etc.

  5. ASPNETUE says:

    A date for the MVC series is not established yet, but we plan to use code-first development in it, and so its release date may coincide roughly with the code-first release date.  Meanwhile, if you haven't seen the new MVC 3 tutorials, check them out as they do use EF code-first:

    (The latter already existed but was revised for MVC 3.)

  6. Kassem says:

    Could you please show us how to build a membership provider that does NOT implement the ASP.NET Membership API? I've noticed a lot of MVC developers are having a lot of problems building membership systems with EF Code First.

    Thank you.


  7. rickj1 says:

    This is great stuff I've read through the new tutorials and I'm looking forward to doing them I'm just in the process of rewriting a Web Form E-commerce site with CodeFirst using an existing data base and I can see from reading these tutorials I can stop scratching my head on a number of issues

    @Kassem there is a MVC MemberShip app on codplex that you just drag into an existing MVC project add a few referances and it gives you a full membership admin section

    Note: CodeFirst is not just for MVC developers I think there are as many benifits for web form developers

    lets face it if you want full control the Object data source is priceless

    Thanks for all your hard work PLEASE keep the tutorials comming

  8. Kassem says:

    @rickj1: Yes I already downloaded the MVC Membership Starter Kit, but I found out that it actually uses the Membership API which I'm trying to avoid. It basically does nothing but "wrap around" the Membership API, which I can easily do by myself. It's a good initiative, but I would've preferred a membership system which takes a POCO class (Member or User) into some sort of an initializer (like in SimpleMembership for WebMatrix) and generates the corresponding table out of it, something like Code First does.

    I'm actually thinking about implementing this myself, but I'm currently too busy building a website for a client and I cannot spend too much time on one part of the project (in this case, the Membership system). So I might dig into it after I deliver the site to my client.

  9. Chester says:

    How to write tests if using ObjectDataSource control?

  10. ASPNETUE says:


    See the second tutorial in the new series.

  11. Kassem says:

    Is there going to be a tutorial series covering EF Code First in details? By that I mean going in detail about mapping with class properties and the Fluent API, as well as affecting the resultant database columns.…/ef-feature-ctp5-fluent-api-samples.aspx

    This is a good introduction but I'd like to see it being used in the context of a full blown real world application.

    Thanks for the tutorials you've already posted, looking forward for future releases as well 🙂

  12. Steve says:

    High level overview: Does 'code first' have anything to offer a data tier that already boosts a mature schema?


  13. ASPNETUE says:


    I have not heard any code-first advantages for that scenario, but that would be a good question for the EF forum at…/threads

  14. ASPNETUE says:


    The MVC series under development will cover Code First in more detail than that blog post and will use the final RTM version of the API, but it will fall short of a full-blown real world application.  When a good example of such an application becomes available I'll include a link to it in the tutorial.

  15. Martin says:

    Please just get enums working, until then to me all your nice posts about how to use the framework is useless.

    Just put all your resources on that single problem, and get it solved before the projects grows and it gets even more complicated to implement it.

    It is the single most important thing that i am missing from the framework.

Comments are closed.

Skip to main content