public void UpdateCategory(Category category)
 {
     using (var context = new GiaikhatNgocMaiEntities())
     {
         context.Categories.Add(category);
         context.Entry(category).State = System.Data.Entity.EntityState.Modified;
         context.SaveChanges();
     }
 }
 public int CreateCategory(Category category)
 {
     using (var context = new GiaikhatNgocMaiEntities())
     {
         context.Categories.Add(category);
         context.SaveChanges();
         return category.Id;
     }
 }