Example #1
0
        public IActionResult Add(AddChildViewModel viewModel)
        {
            if (!ModelState.IsValid)
            {
                return(View(viewModel));
            }

            _repository.Add(viewModel.Children);
            return(RedirectToAction("Details", "Group", new { id = viewModel.Children.GroupId }));
        }
Example #2
0
 public Children Add(Children newChildren)
 {
     return(_childrenRepository.Add(newChildren));
 }
 public long Add(Child child)
 {
     return(_childrenRepository.Add(child));
 }