public async Task <ActionResult> PostAsync(InventoryAdjustment model) { if (!this.ModelState.IsValid) { return(this.InvalidModelState(this.ModelState)); } var meta = await AppUsers.GetCurrentAsync().ConfigureAwait(true); model.OfficeId = meta.OfficeId; model.UserId = meta.UserId; model.LoginId = meta.LoginId; try { long id = await InventoryAdjustments.AddAsync(this.Tenant, model).ConfigureAwait(true); return(this.Ok(id)); } catch (Exception ex) { return(this.Failed(ex.Message, HttpStatusCode.InternalServerError)); } }