private void CreateRequestCategorySample(CISDbContext context) { if (context.RequestCategories.Count() == 0) { List <RequestCategory> listRequestCategory = new List <RequestCategory>() { new RequestCategory() { Name = "Internet/Wifi" }, new RequestCategory() { Name = "Blackboard/Turnitin" }, new RequestCategory() { Name = "Email" }, new RequestCategory() { Name = "Thiết bị" }, new RequestCategory() { Name = "Đăng tin lên IU Web" }, }; context.RequestCategories.AddRange(listRequestCategory); context.SaveChanges(); } }
private void CreateUserGroupSample(CISDbContext context) { if (context.UserGroups.Count() == 0) { List <UserGroup> listUserGroup = new List <UserGroup>() { new UserGroup() { Name = "admin", DisplayName = "Quản trị" }, new UserGroup() { Name = "intmod", DisplayName = "Quản trị mạng" }, new UserGroup() { Name = "webmod", DisplayName = "Quản trị web" }, new UserGroup() { Name = "member", DisplayName = "Thành viên" } }; context.UserGroups.AddRange(listUserGroup); context.SaveChanges(); } }
private void CreateUserSample(CISDbContext context) { if (context.Users.Count() == 0) { List <User> listUser = new List <User>() { new User() { Username = "******", Password = "******", GroupID = CommonConstant.AdminId, Status = true } }; context.Users.AddRange(listUser); context.SaveChanges(); } }
private void CreatePostSample(CISDbContext context) { if (context.Posts.Count() == 0) { List <Post> listPost = new List <Post>() { new Post() { Name = "tin tức 1", Alias = "tin-tuc-1", CategoryID = 1, Status = true }, new Post() { Name = "tin tức 2", Alias = "tin-tuc-2", CategoryID = 1, Status = false }, }; context.Posts.AddRange(listPost); context.SaveChanges(); } }
private void CreatePostCategorySample(CISDbContext context) { if (context.PostCategories.Count() == 0) { List <PostCategory> listPostCategory = new List <PostCategory>() { new PostCategory() { Name = "tin tức", Alias = "tin-tuc", Status = true }, new PostCategory() { Name = "thông báo", Alias = "thong-bao", Status = false }, }; context.PostCategories.AddRange(listPostCategory); context.SaveChanges(); } }
public CISDbContext Init() { return(dbContext ?? (dbContext = new CISDbContext())); }
public VisitTypeRepository(CISDbContext dbContext) { _dbContext = dbContext; }
public MedicalRecordRepository(CISDbContext dbContext) { _dbContext = dbContext; }
public FacilityAndActivityRepository(CISDbContext dbContext) { _dbContext = dbContext; }
public RegulatoryRepository(CISDbContext dbContext) { _dbContext = dbContext; }
public ActivityTypeRepository(CISDbContext dbContext) { _dbContext = dbContext; }
public CompanyRepository(CISDbContext dbContext) { _dbContext = dbContext; }
public RegistrationRepository(CISDbContext dbContext) { _dbContext = dbContext; }
public EncounterTypeRepository(CISDbContext dbContext) { _dbContext = dbContext; }
public AppointmentRepository(CISDbContext dbContext) { _dbContext = dbContext; }