Exemple #1
0
 public void Add(Data.Models.Classified classified, string type)
 {
     if (type == "add")
     {
         _context.Add(classified);
     }
     else
     {
         _context.Update(classified);
     }
     _context.SaveChanges();
 }
Exemple #2
0
 public void Add(Category category, string type)
 {
     if (type == "add")
     {
         _context.Add(category);
     }
     else
     {
         _context.Update(category);
     }
     _context.SaveChanges();
 }