From cc99f0b1edbd999a8eb92aa99b50348649574890 Mon Sep 17 00:00:00 2001 From: Oktawian-L Date: Sat, 9 Nov 2019 09:58:03 +0100 Subject: [PATCH] ConfigureAwait(true) ConfigureAwait(true) --- SubitonAPI/SubitonAPI/Controllers/PhotosController.cs | 4 ++-- SubitonAPI/SubitonAPI/Startup.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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); } }); });