예제 #1
0
 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();
 }
예제 #2
0
        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);
        }
예제 #3
0
 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}"";");
 }
예제 #4
0
 string connectionString = "";//"Data Source=DESKTOP-2F2DTR9\\SQLEXPRESS;Initial Catalog=ORM;Integrated Security=true;TrustServerCertificate=False;MultipleActiveResultSets=True;";
 public ADOSqlClientRepository()
 {
     connectionString = HelperDatabaseSettings.GetConnectionString();
 }