public async Task <IActionResult> Add([FromBody] WorkDTO model) { var result = await _workService.Add(model); if (result) { return(CreatedAtAction(nameof(Add), null)); } else { return(BadRequest()); } }
public IActionResult Add(WorkDto workDto) { var flag = _workService.Add(workDto); return(RedirectToAction("Index")); }
public IActionResult AddWork([FromBody] Work entity) { _workService.Add(entity); return(Ok()); }
public async Task Add(Work work) { await _workService.Add(work); }