public DrapperRepository() { connectionString = HelperDatabaseSettings.GetConnectionString(); //Data Source=DESKTOP-2F2DTR9\\SQLEXPRESS;Initial Catalog=ORM;Integrated Security=true;TrustServerCertificate=False;MultipleActiveResultSets=True; connection = new System.Data.SqlClient.SqlConnection(connectionString); connection.Open(); }
public PetaPocoRepository() { connectionString = HelperDatabaseSettings.GetConnectionString(); //string connectionString = "Data Source=DESKTOP-2F2DTR9\\SQLEXPRESS;Initial Catalog=ORM;Integrated Security=true;TrustServerCertificate=False;MultipleActiveResultSets=True;"; dbConnection = new SqlConnection(connectionString); dbConnection.Open(); db = new Database(dbConnection); }
public EntityFrameworkRepository() { connectionString = HelperDatabaseSettings.GetConnectionString(); //context = new Entities(@"metadata=res://*/Database.ORMEntities.csdl|res://*/Database.ORMEntities.ssdl|res://*/Database.ORMEntities.msl;provider=System.Data.SqlClient;provider connection string="";data source=DESKTOP-2F2DTR9\SQLEXPRESS;initial catalog=ORM;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework"";"); context = new Entities($@"metadata=res://*/Database.ORMEntities.csdl|res://*/Database.ORMEntities.ssdl|res://*/Database.ORMEntities.msl;provider=System.Data.SqlClient;provider connection string="";{connectionString}"";"); }
string connectionString = "";//"Data Source=DESKTOP-2F2DTR9\\SQLEXPRESS;Initial Catalog=ORM;Integrated Security=true;TrustServerCertificate=False;MultipleActiveResultSets=True;"; public ADOSqlClientRepository() { connectionString = HelperDatabaseSettings.GetConnectionString(); }