Beispiel #1
0
        public static ChinaCalendarDbContext GetChinaCalendarDbContext()
        {
            var chinaCalendarDbContext = new ChinaCalendarDbContext(string.Format("Data Source={0};", DbFileFullPath));

            if (!File.Exists(DbFileFullPath))
            {
                chinaCalendarDbContext.Database.EnsureCreated();
            }

            return(chinaCalendarDbContext);
        }
 public LanymyChinaCalendar()
 {
     _CurrentChinaCalendarDbContext             = GlobalSettings.GetChinaCalendarDbContext();
     _CurrentChinaCalendarDbContextDbConnection = _CurrentChinaCalendarDbContext.Database.GetDbConnection();
 }