Closed john-qin closed 10 years ago
I kept getting this error message. not sure where the problem is.
public class MappingRepository { private readonly dynamic _db = Database.OpenNamedConnection("CNFIRConn"); public Mapping GetMapping(string profitCenter) { return _db.Mapping.FindAll(_db.Mapping.ProfitCenter == profitCenter).FirstOrDefault(); } }
<connectionStrings> <add name="CNFIRConn" connectionString="Data Source=localhost;Initial Catalog=test;Integrated Security=True" providerName="System.Data.SqlClient" /> </connectionStrings>
fixed myself, just need to install the provider.
I kept getting this error message. not sure where the problem is.