Esempio n. 1
0
        /// <summary>
        /// 测试git提交 v2018.12.14 -002
        /// </summary>
        /// <returns></returns>
        public IActionResult Index()
        {
            //saasoamanagerContext dbContext = new saasoamanagerContext();
            //dbContext.Tsysquestiontype.Add(new DataAccessModels.Tsysquestiontype()
            //{
            //    Id = 2,
            //    Name = "1",
            //    SystemId = "001",
            //    UserId = 7,
            //    EnterpriseId = 6,
            //    IsDeleted = "0",
            //    IsEnabled = "1",
            //    UtcCreatedDate = DateTime.Now.ToUniversalTime(),
            //    UtcUpdatedDate = DateTime.Now.ToUniversalTime()
            //});

            //dbContext.SaveChanges();
            //dbContext.Dispose();
            int         count          = 3;
            testContext dbMySqlContext = new testContext();

            for (int i = 0; i < 30; i++)
            {
                dbMySqlContext.Tsysquestiontype.Add(new DBMySQLModels.Tsysquestiontype()
                {
                    Id       = count,
                    Name     = count.ToString(),
                    SystemId = "001",
                    //UserId = 7,
                    EnterpriseId   = 6,
                    IsDeleted      = "0",
                    IsEnabled      = "1",
                    UtcCreatedDate = DateTime.Now.ToUniversalTime(),
                    UtcUpdatedDate = DateTime.Now.ToUniversalTime()
                });

                count = count + 1;
            }

            dbMySqlContext.SaveChanges();
            dbMySqlContext.Dispose();

            return(View());
        }
Esempio n. 2
0
 protected override void Dispose(bool disposing)
 {
     db.Dispose();
     base.Dispose(disposing);
 }
Esempio n. 3
0
 public void Dispose()
 {
     db?.Dispose();
 }