Context does not load Bank data

0

My context is not bringing the bank's data.

Error messages.

  

Value can not be null.

     

"Value can not be null. \ r \ n Parameter name: connection"

     

Value can not be null. Parameter name: connection

Connection string string Business Entity

<connectionStrings>
<add name="ASCSEntities" connectionString="" providerName="System.Data.EntityClient" />

Connection string string WPF

  <connectionStrings>
<add name="ASCSEntities" connectionString="" providerName="System.Data.EntityClient" />

Creating the Context:

 public partial class ASCSEntities : DbContext
{
    public ASCSEntities()
        : base("name=ASCSEntities")
    {
    }

    protected override void OnModelCreating(DbModelBuilder modelBuilder)
    {
        throw new UnintentionalCodeFirstException();
    }
}
    
asked by anonymous 21.07.2014 / 16:06

2 answers

1

The double quotation marks can be in this section provider connection string=&quot; and in this App=EntityFramework&quot; . Change to single quotation marks.

connectionString="metadata=res://*/ASCSEF.csdl|res://*/ASCSEF.ssdl|res://*/ASCSEF.msl;provider=System.Data.SqlClient;
     provider connection string='data source=10.000.000.00;initial catalog=ASCS;user id=XX;password=xxxxxx;MultipleActiveResultSets=True;App=EntityFramework'"
    
21.07.2014 / 20:10
1

You should put the ConnectionString in both WPF and Business Entity, when you compile, the .config that predominates is the last layer of the application that is probably WPF.

    
21.07.2014 / 21:21