コード例 #1
0
        public async Task <IActionResult> InsertPhotoGalleryAsync(
            [FromBody] InsertPhotoGralleryRequest insertPhotoGralleryRequest)
        {
            await _awsCloudFacade.InsertAsync(insertPhotoGralleryRequest);

            return(Ok());
        }
コード例 #2
0
        public async Task InsertAsync(InsertPhotoGralleryRequest insertPhotoGralleryRequest)
        {
            StringContent stringContent = GetStringContent(insertPhotoGralleryRequest);

            HttpResponseMessage httpResponseMessage = await HttpClient.PostAsync("api/AwsPhotoGallery", stringContent);

            await httpResponseMessage.ThrowIfResponseHasInvalidStatusCode();
        }
コード例 #3
0
        public async Task OnInvalidSubmitAsync()
        {
            await OnTryCatchAsync(async() =>
            {
                await PhotoGaleryHttpService.InsertAsync(InsertPhotoGralleryRequest);
            });

            InsertPhotoGralleryRequest = new InsertPhotoGralleryRequest();
            await OnAddedCallback.InvokeAsync();
        }
        public static PhotoGalleryModel ToPhotoGalleryModel(
            this InsertPhotoGralleryRequest insertPhotoGralleryRequest)
        {
            if (insertPhotoGralleryRequest == null)
            {
                return(null);
            }

            return(new PhotoGalleryModel
            {
                Id = Guid.NewGuid().ToString(),
                Name = insertPhotoGralleryRequest.Name,
                BucketName = "BucketItemTest",
                KeyName = "KeyName1"
            });
        }
コード例 #5
0
 public async Task InsertAsync(InsertPhotoGralleryRequest insertPhotoGralleryRequest)
 {
     await _noSqlDbCloudService.InsertAsync(insertPhotoGralleryRequest.ToPhotoGalleryModel());
 }