public IActionResult CreateFamily(CreateFamilyModel inputModel) { if (ModelState.IsValid) { this.task1Service.CreateNewFamily(inputModel); } return(LocalRedirect("/Task1/Index")); }
public void CreateNewFamily(CreateFamilyModel model) { Family newFamily = new Family(model.FamilyName); Task1Repo.AddFamily(newFamily); }