示例#1
0
        public DapperContext()
        {
            ReadJsonSettings readJsonSettings = new ReadJsonSettings();

            Connection = new SqlConnection(readJsonSettings.ConnectionString());
            Connection.Open();
        }
示例#2
0
        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        {
            ReadJsonSettings readJsonSettings = new ReadJsonSettings();

            optionsBuilder.UseSqlServer(readJsonSettings.ConnectionString());
        }