Exemplo n.º 1
0
 public void Add(Data.Models.Classified classified, string type)
 {
     if (type == "add")
     {
         _context.Add(classified);
     }
     else
     {
         _context.Update(classified);
     }
     _context.SaveChanges();
 }
Exemplo n.º 2
0
 public void Add(Category category, string type)
 {
     if (type == "add")
     {
         _context.Add(category);
     }
     else
     {
         _context.Update(category);
     }
     _context.SaveChanges();
 }
Exemplo n.º 3
0
 public bool SaveChanges()
 {
     return(_context.SaveChanges() > 0);
 }