Пример #1
0
 // CREATE PERSONNEL
 public static void create(Personnels Personnel)
 {
     using (var context = new TacheContext())
     {
         context.Personnel.Add(Personnel);
         context.SaveChanges();
     }
 }
Пример #2
0
 public static void addPersonnelToTask(Taches taches, Personnels personnels)
 {
     using (var context = new TacheContext())
     {
         context.Tache.Update(taches);
         context.SaveChanges();
     }
 }
Пример #3
0
 public static Boolean Create(Taches taches)
 {
     using (var context = new TacheContext())
     {
         context.Tache.Add(taches);
         context.SaveChanges();
         return(true);
     }
     return(false);
 }
Пример #4
0
 public IActionResult Create(Tache tache)
 {
     _context.Add(tache);
     _context.SaveChanges();
     return(RedirectToAction("Index", "Taches"));
 }