public async Task <IActionResult> UpdateDoanhNghiep(int id, [FromBody] DoanhNghiepDTO doanhNghiepDTO) { var doanhNghiep = doanhNghiepDTO.ToEntity(); await _doanhNghiepService.UpdateDoanhNghiep(doanhNghiep); return(Ok(doanhNghiep)); }
public async Task <IActionResult> CreateDoanhNghiep(DoanhNghiepDTO doanhNghiepDTO) { var doanhNghiep = doanhNghiepDTO.ToEntity(); await _doanhNghiepService.CreateDoanhNghiep(doanhNghiep); return(Ok(doanhNghiep)); }