public async Task UpdateAsync(int id, AdminUpdateOrderModel model) { var order = await GetOrderAsync(id); if (order.StatusId != model.StatusId) { order.StatusId = model.StatusId; // NOTIFICATION } await _context.SaveChangesAsync(); }
public async Task <IActionResult> UpdateOrder([FromRoute] int id, [FromBody] AdminUpdateOrderModel model) { await _orderService.UpdateAsync(id, model); return(Ok()); }