Пример #1
0
        /// <summary>
        /// Update information for a gaming patron in a given service.
        /// </summary>
        /// <param name="managerId">Manager ID</param>
        /// <param name="serviceId">Target service ID</param>
        /// <param name="patronId">Target patron ID</param>
        /// <param name="update">New gaming patron information</param>
        public async Task UpdateGamingPatron(string managerId, string serviceId, string patronId, GamingPatronUpdateRequest update)
        {
            // Ensure the manager has access to the given service.
            await _EnsureManagerCanAccessService(managerId, serviceId);

            // Lookup the service.
            var service = await _database.GetGamingServiceById(serviceId);

            // Throw an exception if the service is not active.
            if (!service.IsActive)
            {
                throw new ServiceIsNotActiveException();
            }

            // Update the gaming patron.
            await _database.UpdateGamingPatron(managerId, patronId, update);
        }