public async Task <DefectForCreationDto> CreateDefect(DefectForCreationDto defect) { await _defectRepository.AddAsync(new Defect() { Type = defect.Type, }); await _defectRepository.SaveAsync(); return(defect); }
public async Task <ActionResult> PostDefect([FromBody] DefectForCreationDto defect) { await _defectService.CreateDefect(defect); return(Ok()); }