コード例 #1
0
 //TODO: Why do we need to convert it to List<CustomerModel> before returning
 //TODO: Is it because of deferred execution of linq queries
 public IEnumerable <ICustomerModel> GetAllCustomersNameAndID(
     bool getOrders = false)
 {
     return(_repository.GetAllCustomersNameAndID()
            .Select(
                customerEntity =>
                new CustomerModel(customerEntity))
            .ToList());
 }