public Customer GetByName(string p_name) { CustomerDataMapper dataMapper = new CustomerDataMapper(FILE_NAME); IEnumerable<Customer> customers = dataMapper.GetAllCustomers(); foreach (Customer customer in customers) { if (customer.ContactName == p_name) { return customer; } } return null; }
public IEnumerable<Customer> GetAllCustomers() { CustomerDataMapper dataMapper = new CustomerDataMapper(FILE_NAME); return dataMapper.GetAllCustomers(); }
public CustomerDao() { m_dataMapper = new CustomerDataMapper(FILE_NAME); m_allCustomers = m_dataMapper.GetAllCustomers(); }