public IQueryable<CharacterClassViewModel> GetClasses(IStartStop metricInfo)
	    {
			metricInfo.Start("Get Records");
			var entityRecords = _characterClassRepository.GetAll();
			metricInfo.Stop();
			metricInfo.Start("Transform to model");
			var modelRecords = entityRecords.Select(CharacterClassMapper.MapEntityToModel).AsQueryable();
			metricInfo.Stop();
		    return modelRecords;
	    }
Exemple #2
0
        public IQueryable <CharacterClassViewModel> GetClasses(IStartStop metricInfo)
        {
            metricInfo.Start("Get Records");
            var entityRecords = _characterClassRepository.GetAll();

            metricInfo.Stop();
            metricInfo.Start("Transform to model");
            var modelRecords = entityRecords.Select(CharacterClassMapper.MapEntityToModel).AsQueryable();

            metricInfo.Stop();
            return(modelRecords);
        }
Exemple #3
0
 public static void ToggleRunningState(this IStartStop s)
 {
     if (s.IsRunning)
     {
         s.Stop();
     }
     else
     {
         s.Start();
     }
 }