Exemple #1
0
        public async Task <Response> GetAll(DataSource dataSource)
        {
            var      list     = _mapper.Map <IEnumerable <SafeDTO> >(await _safeDAL.GetAll()).AsQueryable();
            Response response = Helper.ToResult(list, dataSource);

            response.Entity = new SafeListDTO()
            {
                IncomingTotal  = list.Sum(x => x.Incoming),
                OutcomingTotal = list.Sum(x => x.Outcoming),
            };
            return(response);
        }
Exemple #2
0
        public async Task <Response> GetAll(DataSource dataSource)
        {
            var list = _mapper.Map <IEnumerable <SafeDTO> >(await _safeDAL.GetAll()).AsQueryable();

            return(Helper.ToResult(list, dataSource));
        }