public ActivityDTO GetUserLocation(string guid)
        {
            IdentityService   identityService   = new IdentityService(Database, SyncDatabase);
            CheckpointService checkpointService = new CheckpointService(Database);
            var identity = identityService.GetByGUID(guid);

            if (identity != null)
            {
                var activity = Database.Activity.GetAll().Where(x => x.IdentityGUID == identity.GUID).LastOrDefault();

                return(new ActivityDTO()
                {
                    ID = activity.ID,
                    User = identity,
                    Checkpoint = checkpointService.GetByIP(activity.CheckpointIP),
                    Mode = Database.Mode.GetAll().Where(x => x.ID == activity.ID).FirstOrDefault(),
                    Date = activity.Date,
                    Status = activity.Status
                });
            }
            return(null);
        }
        /// <summary>
        /// Implements <see cref="IStatisticsService.GetByUser(string, DateTime, DateTime)"/>.
        /// </summary>
        public IEnumerable <ActivityDTO> GetByUser(string guid, DateTime start, DateTime end)
        {
            List <ActivityDTO> activities        = new List <ActivityDTO>();
            IdentityService    identityService   = new IdentityService(Database, SyncDatabase);
            CheckpointService  checkpointService = new CheckpointService(Database);
            var identity = identityService.GetByGUID(guid);

            if (identity != null)
            {
                foreach (var activity in Database.Activity.GetAll().Where(x => x.IdentityGUID == guid && x.Date > start && x.Date <= end))
                {
                    activities.Add(new ActivityDTO()
                    {
                        ID         = activity.ID,
                        User       = identity,
                        Checkpoint = checkpointService.GetByIP(activity.CheckpointIP),
                        Mode       = Database.Mode.GetAll().Where(x => x.ID == activity.ID).FirstOrDefault(),
                        Date       = activity.Date,
                        Status     = activity.Status
                    });
                }
            }
            return(activities);
        }