Exemple #1
0
 public long Insert(Product product)
 {
     try
     {
         db.Products.Add(product);
         db.SaveChanges();
         return(product.ID);
     }
     catch (Exception e)
     {
         return(0);
     }
 }
Exemple #2
0
 public long Insert(ApplicationUser entity)
 {
     db.ApplicationUsers.Add(entity);
     db.SaveChanges();
     return(entity.ID);
 }