示例#1
0
        public Database()
        {
            var debugging = WebConfigurationManager.AppSettings["Debugging"];

            _connection = debugging == "true"
                ? new MySqlConnection(
                ConfigurationManager.ConnectionStrings["PortalIswintContextDebug"].ConnectionString)
                : new MySqlConnection(
                ConfigurationManager.ConnectionStrings["PortalIswintContextRelease"].ConnectionString);

            _connection.Open();
            _context = new PortalIswintContext(_connection, false);
        }
示例#2
0
 public Repository(PortalIswintContext context, MySqlConnection connection)
 {
     _context    = context;
     _connection = connection;
 }
示例#3
0
 public Database(PortalIswintContext context)
 {
     _context = context;
 }