Ejemplo n.º 1
0
        public void DeleteTrip(Trip trip)
        {
            Errors.Clear();

            if (!CheckModel(trip, NullTripErrorMessage, NullTripLogErrorMessage, _logger))
            {
                return;
            }

            try
            {
                _logger.Info(string.Format("Start deleting trip {0}", trip.Id));
                var deleted = _persister.Delete(trip);
                _logger.Info(string.Format("End deleting trip {0}", trip.Id));

                if (!deleted)
                {
                    SetErrorAndLog(DeleteFail, _logger);
                }
            }
            catch (Exception ex)
            {
                HandleException(ex, _logger);
            }
        }