Migrations in Entity Framework 7 with Brice Lambson

Download this episode

Download Video

Description

This is the last installment in a series of videos made with the Entity Framework team. In this episode Brice Lambson describes migrations and how they are used in Entity Framework 7. 

Here are some links for more information:

As an aside, I spent a couple of days with the team recording additional videos regarding Entity Framework 7 and some of the new features to look for in the coming release. Look for a summary post coming soon!

Embed

Format

Available formats for this video:

Actual format may change based on video formats available and browser capability.

    The Discussion

    • User profile image
      jlcard

      Thanks for the video Brice and Seth, super cool to see the new features and improvements EF7 has.

    • User profile image
      JStellato

      Great video, I have a couple of questions:

      In public override void Up I saw this:

      ID = table.Column(type: "int", nullable: false)

      .Annotation("SqlServer:ValueGeneration", "Identity")

      "int" and "identity" are stringly typed, are there any plans to make those strongly typed?

      Do migrations delete data? For small startups, the Developers are sometimes the DBA's. And it's convenient to build and deploy from Visual Studio, once to Dev and once to Production. If we use this example, i.e. add a Column of "Last Name" will any records be deleted, or will the column just be added?

      Thanks!

    • User profile image
      Fujiy

      Really enjoyed this series! Very good Seth and Brice!!!

      PS: Brice, it's time to update your GitHub (gravatar) photo :D

    • User profile image
      AnilApex

      I was not able to Add-Migration in class library.

      I'm using EntityFramework.Sqlite (EF7) in UWP app.

      I added model & DBContext context class in class library (code-first approach). When I tried Add-Migration, it throws error.

      Am I doing something wrong or migrations cannot be added to class library?

      Please Note: Add-Migration worked when I shifted model & DBcontext class to UWP blank project.

    Comments closed

    Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.