示例#1
0
 public ActionResult Unsubscribe(Guid subID)
 {
     if (_subscriptionRepo.Get(subID) == null)
     {
         ModelState.AddModelError("SubscriptionError", $"SubscriptionID: {subID} not found");
         return(NotFound(ModelState));
     }
     _subscriptionRepo.Delete(subID);
     return(Ok());
 }