Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 3
0
        public IEnumerable <RegistrationRequestModel> GetAllRequests()
        {
            // We don't pass password!
            var requests = context.RegistrationRequests.AsNoTracking()
                           .Include(_ => _.Role)
                           .Select(_ => modelMapper.MapTo <RegistrationRequest, RegistrationRequestModel>(_))
                           .ToList();

            return(requests);
        }