private void CreateProductCategorySample(MinhvhDbContext context) { if (!context.ProductCategories.Any()) { List <ProductCategory> listProductCategories = new List <ProductCategory> { new ProductCategory() { Name = "Điện lạnh", Alias = "dien-lanh", CreatedBy = "admin", Status = true, CreatedDate = DateTime.Now }, new ProductCategory() { Name = "Đồ gia dụng", Alias = "do-gia-dung", CreatedBy = "admin", Status = true, CreatedDate = DateTime.Now }, new ProductCategory() { Name = "Quần áo", Alias = "dien-lanh", CreatedBy = "admin", Status = true, CreatedDate = DateTime.Now } }; context.ProductCategories.AddRange(listProductCategories); context.SaveChanges(); } }
public MinhvhDbContext Init() { return(dbContext ?? (dbContext = new MinhvhDbContext())); }
public ApplicationUserStore(MinhvhDbContext context) : base(context) { }