Application wpf with entity framework does not work on another machine

1

I have a wpf application with entity framework and sql server express ... it works perfectly on my pc, but when I try to install on another computer it does not work ... the application does not create the database with the frst code of the entity createIfNotExists () and the app does not open, does not run. The strange thing is that on my pc when I run the app it creates the correct bank and runs the application.

My connection string:

    <add name="BarberSystem.Properties.Settings.BancoTesteConnectionString" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=BARBER_DATABASE;Integrated Security=SSPI" providerName="System.Data.SqlClient" />
<add name="BARBER_DATABASE" connectionString="data source=.\SQLEXPRESS;initial catalog=BARBER_DATABASE;integrated security=SSPI;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" />

the constructor of my entity context class

 public BancoDados()
        : base("name=BARBER_DATABASE") {
        Database.SetInitializer(new CreateDatabaseIfNotExists<BancoDados>());
    }
    
asked by anonymous 05.06.2018 / 01:49

0 answers