Exemplo n.º 1
0
 //phuong thuc insert into table role
 public RoleEntity Save(RoleEntity roleEntity)
 {
     dbContext.roles.AddAsync(roleEntity);
     dbContext.SaveChangesAsync();
     return(roleEntity);
 }
Exemplo n.º 2
0
 //phương thức insert into table product
 public Product2 AddProduct(Product2 Product)
 {
     dbContext.Products.AddAsync(Product);
     dbContext.SaveChangesAsync();
     return(Product);
 }