public int CreatePerson(ZPeopleInput input) { //Creating a new Task entity with given input's properties var person = AutoMapper.Mapper.Map <Person>(input); //var person = new Person() //{ // Age=input.Age, // Name=input.Name //}; //Saving entity with standard Insert method of repositories. return(_personRepository.InsertAndGetId(person)); }
public ActionResult Create(ZPeopleInput model) { try { // TODO: Add insert logic here var id = _PeopleSerivice.CreatePerson(model); // var input = new GetTasksInput(); // var output = _taskAppService.GetTasks(input); return(RedirectToAction("Index")); } catch (Exception ex) { return(Content(ex.Message)); } }