コード例 #1
0
        public void Replay(LiftAddedEvent @event)
        {
            var liftDistance = new Distance(@event.LiftDistance, DistanceUnit.Kilometer);
            var journey      = _repositories
                               .Get <Journey>(@event.JourneyId)
                               .AddLift(@event.PersonId, liftDistance);

            _repositories.Store(journey);
        }
コード例 #2
0
        public ActionResult <IEnumerable <Organization> > GetOrganization()
        {
            try
            {
                _log4net.Info("Http Get request Initiated");

                var orgs = _repository.Get();
                if (orgs != null)
                {
                    _log4net.Info("successfully got details");
                    return(Ok(orgs));
                }
            }
            catch (Exception e)
            {
                _log4net.Error("No result " + e.Message);
                return(new NoContentResult());
            }
            return(BadRequest());
        }