예제 #1
0
        /// <summary>
        /// Returns customer data, ordered by id and name  by desc
        /// </summary>
        /// <returns></returns>
        public async Task <List <Customer> > GetAllCustomersAsync()
        {
            var customers = await _cusomerDao.GetAllCustomers();

            customers.OrderBy(r => r.Name).OrderByDescending(c => c.Id);
            return(customers);
        }
예제 #2
0
        public async Task <List <Report> > GetAllCustomerReportsAsync()
        {
            var customerList = await _customerDao.GetAllCustomers();

            var newList = _reportList.Join(customerList, report => report.CustomerId, customer => customer.Id, (report, customer) => new Report
            {
                Id = report.Id, Customer = customer, CustomerId = report.CustomerId, ReportData = report.ReportData, CreatedUtc = report.CreatedUtc, UpdatedUtc = report.UpdatedUtc
            }).ToList();

            return(newList);
        }