/// <summary> /// Checkout a gaming patron from an active gaming service. /// </summary> /// <param name="managerId">Manager ID</param> /// <param name="serviceId">Target service ID</param> /// <param name="patronId">Target patron ID</param> public async Task CheckOutGamingPatron(string managerId, string serviceId, string patronId) { // Ensure the manager has access to the given service. await _EnsureManagerCanAccessService(managerId, serviceId); // Lookup service information. var service = await _database.GetGamingServiceById(serviceId); // Throw an exception if the service is not active. if (!service.IsActive) { throw new ServiceIsNotActiveException(); } // Checkout the gaming patron. await _database.CheckOutGamingPatron(serviceId, patronId); }