public List <TrainingSession> GetTrainingSessionItems(int userd)
        {
            List <TrainingSession> trainingSessions;

            try
            {
                GenericError error;
                trainingSessions = TrainingSessionsRepository.GetEntities(out error, s => s.UserId == userd);
            }
            catch (Exception ex)
            {
                var dateTime = DateTime.UtcNow;
                Log.LogInfo(dateTime + ": " + "During the Execution of GetList<T, TKey> an error occured; Excreption Message: " + ex);
                throw;
            }

            return(trainingSessions);
        }
        public List <TrainingSession> GetTrainingSessionItems(Func <TrainingSession, bool> filter)
        {
            GenericError error;

            return(TrainingSessionsRepository.GetEntities(out error, filter));
        }