c# - Publish Entity-Framework Code-First Migrations with Context in another project -
i've same problem described here , i've try apply suggested solution changing connection string name fqn of db context placed in project.
web project web.config file (in project myapplication.web):
<connectionstrings> <add name="farmacianataliniserver.infrastructure.applicationdbcontext" connectionstring="data source=(localdb)\mssqllocaldb;attachdbfilename=|datadirectory|\aspnet-farmacianataliniserver-20151127115838.mdf;initial catalog=aspnet-farmacianataliniserver-20151127115838;integrated security=true" providername="system.data.sqlclient" />
applicationdbcontext.cs (in project myapplication):
public class applicationdbcontext : identitydbcontext<applicationuser> { public dbset<registereddevice> registereddevices { get; set; } public dbset<reservation> reservations { get; set; } public applicationdbcontext() : base("farmacianataliniserver.infrastructure.applicationdbcontext", throwifv1schema: false) { } ...
unfortunately seems solution not work anymore on visual studio 2015 :(
can me that?
thank in advance!
i found solution problem. i've createad new fresh project adding files , dependencies 1 one , found ones make option disappear.
they were:
- autofac.owin
- autofac.mvc.owin
- autofac.webapi2.owin
and controller inherits knockoutcontroller package perpetuumsoft.knockout.
i've removed these dependendecies , code-first option on publish dialog visible , activable again.
don't know why these dependencies cause problem, don't see correlation it's working desired. :)
Comments
Post a Comment