Example #1
0
        public IActionResult CreateFamily(CreateFamilyModel inputModel)
        {
            if (ModelState.IsValid)
            {
                this.task1Service.CreateNewFamily(inputModel);
            }

            return(LocalRedirect("/Task1/Index"));
        }
Example #2
0
        public void CreateNewFamily(CreateFamilyModel model)
        {
            Family newFamily = new Family(model.FamilyName);

            Task1Repo.AddFamily(newFamily);
        }