Error in Entity framework code first -


not sure why getting error. practice code learn entity framework code first approach.

i have following in web.config

<add name="companydbcontext"      connectionstring="server=.; database=companydb;integrated security=true;"      providername="system.data.sqlclient"/> <connectionstrings> 

and following class

public class companydbcontext: dbcontext {      public  dbset<department> departments { get; set; }     public dbset<employee> employees { get; set; }  } 

the error is:

http error 500.19 - internal server error requested page cannot accessed because related configuration data page invalid. 

thanks in advance!

the connection string format wrong. correct is:

<connectionstrings>     <add name="companydbcontext"          connectionstring="server=.; database=companydb;integrated security=true;"          providername="system.data.sqlclient"/> </connectionstrings> 

Comments