public IEnumerable <CustomerDetailDTO> Get() { return(from c in _customerDetailRepository.GetCustomers() select new CustomerDetailDTO() { UserId = c.GetAccountId(), ChtName = c.GetChtName(), Location = new DetailData("台灣").Location }); }
public async Task <ActionResult <IEnumerable <Customer> > > GetCustomer(string postCode, string dateOfBirth) { var customers = await _customerDetailRepository.GetCustomers(postCode, dateOfBirth); if (customers == null) { return(NotFound()); } return(customers.ToList()); }