public async Task <IActionResult> Update(int id, [FromBody] DeliveryNoteResource dn) { var storedDn = await _dnRepo.GetByIdAsync(dn.Id); _mapper.Map(dn, storedDn); storedDn.UpdateDate = DateTime.Now; storedDn.UpdateBy = User.FindFirst(ClaimTypes.Name).Value; await _uom.CommitAsync(); return(Ok("Updated successfully.")); }