public async Task <IActionResult> CreateMucDo(MucDoDTO mucDoDTO) { var mucDo = mucDoDTO.ToEntity(); await _mucDoService.CreateMucDo(mucDo); return(Ok(mucDo)); }
public async Task <IActionResult> UpdateMucDo(int id, [FromBody] MucDoDTO mucDoDTO) { var mucDo = mucDoDTO.ToEntity(); await _mucDoService.UpdateMucDo(mucDo); return(Ok(mucDo)); }
public async Task <IActionResult> GetMucDoById(int id) { var mucDo = await _mucDoService.GetMucDoById(id); var result = MucDoDTO.FromEntity(mucDo); return(Ok(result)); }