c# - Entities' does not contain a constructor that takes 1 arguments -


public class connection {     public static string getconecction()     {         return configurationmanager.connectionstrings["dcassetentities"].connectionstring;     } } 

i have 1 "connection" class configure web entity framework model entities

public class connectiondal {     private dcassetentities db;      public connectiondal()     {         db = new dcassetentities(connection.getconecction());     } } 

then intialize database in "connectiondal" class constructor,, it's working in visusal studio 2010 in visusal studio 2012 showing error "dc_asset_maintenance.dal.dcassetentities' not contain constructor takes 1 arguments "

your class dcassetentities needs have constructor following definition.

public dcassetentities(string connectionstring){} 

Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -