예제 #1
0
        public IList <T> Get(TSearch request = default)
        {
            var list = _context.Set <TDb>().ToList();

            //var list = _context.Korisnici.ToList();
            return(_mapper.Map <IList <T> >(list));
        }
예제 #2
0
        public virtual IEnumerable <T> Get(TSearch search = null)
        {
            var entity = Context.Set <TDb>();

            var list = entity.ToList();

            return(_mapper.Map <List <T> >(list));
        }
예제 #3
0
        public override List <Proizvod> Get(ProizvodSearchRequest request)
        {
            var list = _database.Set <Proizvodi>().AsQueryable();

            if (request?.VrstaId.HasValue == true)
            {
                list = list.Where(a => a.VrstaId == request.VrstaId);
            }
            list = list.OrderBy(a => a.Naziv);
            var listreturn = list.ToList();

            return(_mapper.Map <List <Model.Proizvod> >(listreturn));
        }
예제 #4
0
        public virtual IList <T> GetAll(TSearch search = default)
        {
            var result = _context.Set <TDb>().ToList();

            return(_mapper.Map <IList <T> >(result));
        }
예제 #5
0
        public virtual List <TModel> Get(TSearch search)
        {
            var list = _context.Set <TDatabase>().ToList();

            return(_mapper.Map <List <TModel> >(list));
        }
예제 #6
0
        public virtual List <TModel> Get(TSearchRequest request)
        {
            var list = _database.Set <TDatabase>().ToList();

            return(_mapper.Map <List <TModel> >(list));
        }
예제 #7
0
 public virtual async Task <List <TModel> > Get(TSearch search)
 {
     return(_mapper.Map <List <TModel> >(await _context.Set <TDatabase>().ToListAsync()));
 }