Migrations in Entity Framework 7 with Brice Lambson

Sign in to queue

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

Download

Download this episode

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.

Add Your 2 Cents