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; }
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); }
public static void ToggleRunningState(this IStartStop s) { if (s.IsRunning) { s.Stop(); } else { s.Start(); } }