Exemple #1
0
 public IActionResult ValidatePerson(Person person)
 {
     if (!ModelState.IsValid)
     {
         return(View("Create"));
     }
     context.Add(person);
     context.SaveChanges();
     return(View("PersonAdded", person));
 }
Exemple #2
0
 public void AddOrder(object model)
 {
     _ctx.Add(model);
 }