public async Task OnPostSaveUpdatedAsNewImageAsync(Guid imageId, Guid?recordId) { RecordId = recordId; var newImageId = await _imagesEditService.CreateNewImageFromChanged(imageId); if (RecordId != null && RecordId.Value != Guid.Empty) { await _recordImagesService.AddRecordImage(RecordId.Value, newImageId); } await UpdateModel(newImageId); }
public async Task <ActionResult <Guid> > SaveChangesAsNewImage(Guid imageId) { try { var newImageId = await _imagesEditService.CreateNewImageFromChanged(imageId); return(Ok(newImageId)); } catch (ArgumentException exc) { return(BadRequest(exc.Message)); } }