Beispiel #1
0
 private bool ValidateBookingExists(BookingSubjectType type)
 {
     if (Enum.IsDefined(typeof(BookingSubjectType), type))
     {
         return(true);
     }
     return(false);
 }
Beispiel #2
0
 public async Task <bool> ValidateBookingExists(BookingSubjectType type)
 {
     if (await _context.BookingSubjects.AnyAsync(b => b.BookingType == type))
     {
         return(true);
     }
     return(false);
 }