Esempio n. 1
0
        public CourseViewModel GetCourseViewModelById(int id)
        {
            var c     = _repo.GetById(id);
            var d     = _disciplineRepo.GetById(c.DisciplineId);
            var model = new CourseViewModel
            {
                Name             = c.Name,
                Id               = c.Id,
                Lap              = c.Lap,
                ExternalCourseId = c.ExternalCourseId,
                Distance         = c.Distance,
                DisciplineId     = c.DisciplineId,
                DisciplineName   = d.Name,
                Deleted          = c.Deleted
            };

            return(model);
        }
Esempio n. 2
0
 public Discipline GetById(int id)
 {
     return(rep.GetById(id));
 }