in MonolithicApplication/src/Controllers/BasketController.cs [72:103]
public async Task<IHttpActionResult> PutUnicornBasket(Guid id, basket unicornBasket)
{
if (!this.ModelState.IsValid)
{
return this.BadRequest(this.ModelState);
}
if (id != unicornBasket.basket_id)
{
return this.BadRequest();
}
this.unishopEntitiesContext.SetModified(unicornBasket);
try
{
await this.unishopEntitiesContext.SaveChangesAsync();
}
catch (DbUpdateConcurrencyException)
{
if (!this.UnicornBasketExists(id))
{
return this.NotFound();
}
else
{
throw;
}
}
return this.StatusCode(HttpStatusCode.NoContent);
}