public Try <IQueryable <DocumentTypeDto> > Execute()
        {
            Func <IQueryable <DocumentTypeDto> > query =
                () => repository
                .GetAll()
                .Select(x => x.ToDocumentTypeDto());

            return(Try(query));
        }
Esempio n. 2
0
        public ActionResponse <IQueryable <DocumentTypeDto> > GetAll(params Enums.Status[] statuses)
        {
            var response = _documentTypeRepository.GetAll(statuses);

            return(response);
        }
Esempio n. 3
0
        public async Task <IEnumerable <DocumentTypeDto> > GetAll()
        {
            var response = await Task.FromResult(_mapper.Map <IEnumerable <DocumentTypeDto> >(_repoDocumentType.GetAll <DocumentTypeEntity>()));

            if (response.Count() == 0)
            {
                throw new DocumentTypeEntityIsEmptyException();
            }
            return(response);
        }
Esempio n. 4
0
 public IEnumerable <DocumentType> GetAll()
 {
     return(_Repository.GetAll());
 }
Esempio n. 5
0
 public ICollection <DocumentTypeDomain> GetAllTypes()
 {
     return(_documentTypeRepository.GetAll());
 }
 public List <DocumentTypeViewModel> GetDocumentTypes()
 {
     return(_repository.GetAll().ProjectTo <DocumentTypeViewModel>().ToList());
 }