public IEnumerable <PersonalCardModel> GetAll() { var personalCards = context.PersonalCards.AsNoTracking() .Include(_ => _.EmploymentType) .Select(_ => modelMapper.MapTo <PersonalCard, PersonalCardModel>(_)) .ToList(); return(personalCards); }
public IEnumerable <SubjectModel> GetSubjects() { var subjects = context.Subjects.AsNoTracking() .Include(_ => _.CycleCommissionSubjects) .Select(_ => modelMapper.MapTo <Subject, SubjectModel>(_)) .ToList(); return(subjects); }
public IEnumerable <RegistrationRequestModel> GetAllRequests() { // We don't pass password! var requests = context.RegistrationRequests.AsNoTracking() .Include(_ => _.Role) .Select(_ => modelMapper.MapTo <RegistrationRequest, RegistrationRequestModel>(_)) .ToList(); return(requests); }