Monday, September 1, 2014

Example for update database when your project have two or more available context



Refer the below image for update database when your project have two or more available context



For example when your project have migration called context1 (Refer above image "For Context 1" statement)
update-database -configuration Sarasa.ERP.Data.Migrations.Configuration -force -verbose
in this statement the red colored text is the migration folder name for context1.

So when you want to update database within the context2 you only have to change the migration floder name in above statement, looks like example below.  (Refer above image "For Context 2" statement)
update-database -configuration Sarasa.ERP.Data.Migrations2.Configuration -force -verbose

5 comments:

  1. Replies
    1. What is the error Mr.Sanjeewa

      Delete
    2. what is the Sarasa.ERP.Data.. please explain that............

      ...

      Delete
    3. Cant you see that in the figure.. Sarasa.ERP.Data is the project that contain the Migrations for database.

      Delete
    4. please briefly explain that. i think some error in that update statement..

      Delete