Migrations in Entity Framework 7 with Brice Lambson

Play Migrations in Entity Framework 7 with Brice Lambson

The Discussion

  • User profile image

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

  • User profile image

    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?


  • User profile image

    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.

Add Your 2 Cents