public async Task <IActionResult> Create([FromBody] ManagerVM managerVM) { try { Manager m = managerVM.ToModel(); return(this.Ok(await managerAPI.Add(m))); } catch { return(StatusCode(500)); } }
public async Task <IActionResult> Update(int Id, [FromBody] ManagerVM managerVM) { try { Manager m = await this.managerAPI.GetById(Id); m = managerVM.ToModel(m); return(this.Ok(await managerAPI.Update(m))); } catch { return(StatusCode(500)); } }