Ejemplo n.º 1
0
        public async Task DeleteTravelAsync([NotNull] string travelId)
        {
            var travel = await FindTravelAsync(travelId);

            if (travel.Users.Count > 0)
            {
                throw new Exception("EntityNotDeleted");
            }
            await travelRepository.DeleteAsync(travel);
        }