diff --git a/SubitonAPI/SubitonAPI/Controllers/PhotosController.cs b/SubitonAPI/SubitonAPI/Controllers/PhotosController.cs index 108fb62..5b25920 100644 --- a/SubitonAPI/SubitonAPI/Controllers/PhotosController.cs +++ b/SubitonAPI/SubitonAPI/Controllers/PhotosController.cs @@ -78,7 +78,7 @@ public async Task PutPhoto(int id, Photo photo) try { - await _context.SaveChangesAsync(); + await _context.SaveChangesAsync().ConfigureAwait(true); } catch (DbUpdateConcurrencyException) { @@ -102,7 +102,7 @@ public async Task PutPhoto(int id, Photo photo) public async Task> PostPhoto(Photo photo) { _context.Photos.Add(photo); - await _context.SaveChangesAsync(); + await _context.SaveChangesAsync().ConfigureAwait(true); return CreatedAtAction("GetPhoto", new { id = photo.Id }, photo); } diff --git a/SubitonAPI/SubitonAPI/Startup.cs b/SubitonAPI/SubitonAPI/Startup.cs index c8721c4..381a1ac 100644 --- a/SubitonAPI/SubitonAPI/Startup.cs +++ b/SubitonAPI/SubitonAPI/Startup.cs @@ -81,7 +81,7 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env, Seed see if (error != null) { context.Response.AddApplicationError(error.Error.Message); - await context.Response.WriteAsync(error.Error.Message); + await context.Response.WriteAsync(error.Error.Message).ConfigureAwait(true); } }); }); @@ -98,7 +98,7 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env, Seed see if (error != null) { context.Response.AddApplicationError(error.Error.Message); - await context.Response.WriteAsync(error.Error.Message); + await context.Response.WriteAsync(error.Error.Message).ConfigureAwait(true); } }); });