public HttpError Process(Request request)
 => Invoice.ActiveCount(_user) > _limit
         ? new HttpError(HttpStatusCode.Forbidden, "User has too many active invoices")
         : null;
Пример #2
0
 public static bool ActiveInvoiceExists(User user, int entityId, EntityType type)
 => Invoice.ActiveCount(user, entityId, type) > 0;