private void InitDbContext(CCMSServiceContext context) { Configuration = new ConfigurationBuilder().AddJsonFile("mock.json").Build(); context.PayTmOtplog.Add(new PayTmOtplog { MobileNumber = "8807542027", CrdtDt = DateTime.Now, Pkid = 121, Totp = "123" }); context.SaveChanges(); }
private void InitDbContext(CCMSServiceContext context) { Configuration = new ConfigurationBuilder().AddJsonFile("mock.json").Build(); context.SlicTechProStatus.Add(new SLIC_TechProStatus { PaynimoID = "8807542027", CrtdDt = DateTime.Now, Pkid = 121 }); context.SaveChanges(); }
private void InitContext() { var builder = new DbContextOptionsBuilder <CCMSServiceContext>().UseInMemoryDatabase(); CCMSServiceContext context = new CCMSServiceContext(builder.Options); context.Database.EnsureCreated(); context.Database.EnsureDeleted(); InitDbContext(context); context.SaveChanges(); CcmsServiceContext = context; }