public IActionResult PostUnit(Unit data) { try { var res = _repository.AddUnit(data); if (res == -1) { return(Conflict(409)); } return(Ok(res)); } catch (Exception error) { return(BadRequest(error)); } }
public IActionResult PostUnit(Unit data) { try { var res = _repository.AddUnit(data); if (res == -1) { return(Conflict(409)); } return(Ok(res)); } catch (Exception error) { return(BadRequest(error)); } }