Sdílet prostřednictvím


Entity Framework Tutorials for ASP.NET Developers

We have been working on new tutorials intended to introduce ASP.NET developers to the Entity Framework. The first series,  Getting Started with the Entity Framework and ASP.NET, has been published on the ASP.NET site. The tutorials build a sample application for which you can download the Visual Studio project.

Here is an outline of topics covered in this series:

  • Creating a data model from a database
  • Using the EntityDataSource control
    • Displaying and updating data
    • Sorting, filtering, and grouping
    • Displaying and updating related data (many-to-many as well as one-to-many or one-to-zero-or-one relationships)
  • Implementing table-per-hierarchy (TPH) inheritance
  • Using stored procedures

We’re currently working on a Continuing with the Entity Framework and ASP.NET series. In that series we plan to cover:

  • Using the ObjectDataSource with the Entity Framework
    • Displaying and updating data
    • Implementing the repository pattern
    • Sorting and filtering
  • Handling concurrency conflicts
  • Maximizing performance
  • What’s new in the Entity Framework version 4

Both of these series build on a Web Forms example, although topics such as setting up inheritance, using stored procedures, handling concurrency, and maximizing performance apply equally to MVC. To show more directly how to use the Entity Framework in an MVC application, another series is planned that would build an MVC application similar to the Web Forms application. The MVC series would also provide examples of how to use features that are more likely to be of interest to MVC developers, such as POCOs and code-only.

We are looking for feedback on the published tutorial and on these plans for future tutorials. Are there topics that you do not see in the tutorial or in the plans for the future that you would like to see?  Do you have suggestions for improving the published tutorial? The tutorials themselves provide a link to the Entity Framework forums for providing feedback, but if you are finding out about them from this blog post, please post your comments here and we will respond to them.

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

Comments

  • Anonymous
    December 08, 2010
    I'm pleased to see the asp.net tutorials getting a refresh as for a long time there hasn't really been anywhere for me to point users to when questions come up in the forums. Ive also put off learning EF myself for this reason. I'm looking forward to reading them. I see that you say WebForms users aren't going to be interested in POCO tutorials. Is this because we are all cowboy programmers? :) When I heard about them my ears pricked up as I prefer to follow clean coding practices. Is there a technical reason why you think POCO is for MVC only?
  • Anonymous
    December 08, 2010
    Just what i was looking for !!  Great news. With this and  Julia's book,  learning and understanding EF is a lot easier .cheers,
  • Anonymous
    December 08, 2010
    I think this is a great idea. I love the data tutorials Scott Mitchell did for the Asp.net site. It would be nice to have an EF version of data access for both WEbForms and MVC. I'm glad to see you'll be including the repository pattern. I'd also like to see the unit of work pattern implemented. I've been looking at the NCommon project and really like it.
  • Anonymous
    December 09, 2010
    @rtpHarryThe intention was not to suggest that Web Forms developers woudn't be interested in POCOs -- it's just that we don't have unlimited time to spend on developing the tutorials, and the MVC series seemed the most appropriate place to cover them.  There is no technical reason why you can't use them in Web Forms applications.
  • Anonymous
    December 09, 2010
    Hi,I notice that the Getting Started tutorials are in C# are there going to be any in VB?Thanks
  • Anonymous
    December 09, 2010
    Yes, Expecting it to be integrated with LINQ, jQuery, Ajax and more.
  • Anonymous
    December 09, 2010
    Although I am using the C# download, I prefer VB.So where is the VB version of the tutorial?yousaid
  • Anonymous
    December 10, 2010
    We're working on a VB version of the downloadable project and hope to have it available next week, assuming that work does not get displaced by something with a higher priority in the mean time.@zthtbjQuery and Ajax were out of scope for these tutorials which focus on introducing the Entity Framework and using the EntityDataSource control. There is some LINQ in the tutorials, but we also wanted to demonstrate the use of Entity SQL, which you need to know for setting some control properties.  If you are unclear about some aspects of using jQuery or AJAX in an application that uses the Entity Framework, and if you can provide specific information about what is problematic, we might be able to work an example into one of the tutorials that are still being developed.
  • Anonymous
    December 10, 2010
     I received an error from VS 2010 Professional Eval edition regarding the connection to the database. I do not have SQLEXPRESS installed, but do have SQL Server 2008 R2 installed. Even though the error was produced, I was able to get the SchoolModel created?
  • Anonymous
    December 11, 2010
      I have Programming Entity Framework second edition by Julia Lerman its a good book it covers the entity framework pretty well but the walkthroughs leave a lot to be desiredand they don't cover ASP.NET very well especially layered applications. Decoupling and seperation of concerns is as important to web form developers as it is to MVC developers I would like to see a tutorial that starts from file > new and walkthrough  building a complete layered web forms app using POCO. I've read through your new tutorial it's very interesting and it complements Programming Entity Framework secound edition by Julia Lerman I'm looking forward to sitting down and doing them thanks for your work please keep them comming and remember some developers do Web Forms as well as MVC so any insight in either areana is apreciatedThanks for your hard work
  • Anonymous
    December 13, 2010
    @LarryThe best place to ask questions about problems like this one (as opposed to questions about the tutorial itself, which we can address) is the ASP.NET forums.  For your error I suggest the SQL Server forum at:forums.asp.net/1226.aspx