public ActionResult Edit(EditStoreCommand command) { if (!ModelState.IsValid) { return(View("Edit")); } var pictures = PreparePicture(command.HttpPostedFileBases, StorePicturePath); command.Pictures = pictures; command.UserId = CurrentUser.Id; var result = _commandBus.Send(command); if (!result.Success) { return(JsonMessage(result)); } SavePicture(pictures, StorePicturePath); return(JsonMessage(result)); }
public ActionResult Edit(EditStoreCommand input) { return(TryPush(input)); }
public async Task <ActionResult <EditStoreResponse> > Edit([FromBody] EditStoreCommand command) { return(Ok(await Mediator.Send(command))); }