none
Help Me RRS feed

  • Question

  • I need Answer to this Qu?

    PM> Enable-Migrations
    More than one context type was found in the assembly 'MvcApplication2'.
    To enable migrations for 'MvcApplication2.Models.UsersContext', use Enable-Migrations -ContextTypeName MvcApplication2.Models.UsersContext.
    To enable migrations for 'MvcApplication2.Models.StoreDBContext', use Enable-Migrations -ContextTypeName MvcApplication2.Models.StoreDBContext.

    ???

    How


    Thursday, January 9, 2014 7:48 AM

Answers

  • Hi. Follow the instructions in the error. For example if you want to enable migrations on the StoreDBContext enter the following in the Package Manager Console:

    Enable-Migrations -StoreDBContext
    Thursday, January 9, 2014 9:05 AM

All replies

  • Hi. Follow the instructions in the error. For example if you want to enable migrations on the StoreDBContext enter the following in the Package Manager Console:

    Enable-Migrations -StoreDBContext
    Thursday, January 9, 2014 9:05 AM
  • Hello Ahmed Marouf,

    >>More than one context type was found in the assembly 'MvcApplication2'…

    This error shows that you have two context in your project, when we want to use the migrations, we can only specify one and we just need to do as what J Chase have said.

    Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, January 10, 2014 2:29 AM
    Moderator