/// <summary> /// Close a dining table, marking it as no longer active. /// </summary> /// <param name="managerId">Manager ID</param> /// <param name="serviceId">Target service ID</param> /// <param name="tableId">Target table ID</param> public async Task CloseDiningTable(string managerId, string serviceId, string tableId) { // Ensure that the manager has access to the given service. await _EnsureManagerCanAccessService(managerId, serviceId); // Lookup service information. var service = await _database.GetDiningServiceById(serviceId); // Throw an exception if the service is not active. if (!service.IsActive) { throw new ServiceIsNotActiveException(); } // Close the dining table. await _database.CloseDiningTable(serviceId, tableId); }