public async Task <IActionResult> PutSubscription(int id, Subscription subscription) { try { await _subscriptionsService.PutAsync(id, subscription); } catch (DbUpdateConcurrencyException) { if (!_subscriptionsService.SubscriptionExists(id)) { return(NotFound()); } throw; } return(NoContent()); }