public async Task <IActionResult> Post([FromBody] Сupboard value) { if (value != null) { return(Ok(await _repository.CreateAsync(value))); } return(BadRequest()); }
public async Task PutAsync(Guid id, [FromBody] Сupboard value) { if (id != Guid.Empty) { if (id == value.Id && await _repository.DoesItemExist(id)) { await _repository.UpdateAsync(value); } } }