Entity Framework

in #entity-framework7 years ago

Entity Framework - 

  • Create Database if not exists
  • Drop database always
  • Drop database if model changes 

Migrate to Latest Version: Look for it in migration folder to see new migrations

Enable-Migrations in Package Manager Console

Add-Migration : Adds migrations in Migration Folder

Update Database - Migrations --> Changes Database

OR

Let DB Initializer handle it by settiing --> Migrate to Latest Version 

eg:

When 2 developers working together:

One dev changes model --> Says "ADD-MIGRATION"  --> Adds to folder, and it moves in source code.

Other dev --> don't do anything

As DB Initializer is set to " Migrate to Latest Version"

Sort:  

Congratulations @jotdeol! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 2 years!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Do not miss the last post from @steemitboard:

SteemitBoard supports the SteemFest⁴ Travel Reimbursement Fund.
Vote for @Steemitboard as a witness to get one more award and increased upvotes!

Coin Marketplace

STEEM 0.17
TRX 0.24
JST 0.034
BTC 96239.49
ETH 2782.12
SBD 0.67