internal CustomerCatalog() { db = CustomerDBFactory.GetDBL(); customers = new Dictionary <int, Customer>(); LoadCatalog(); }
public static List <Customer> LivingWithin100Km(ICustomerDB potentialCustomers) { LatLong DublinOffice = new LatLong(53.3393, -6.2576841); List <Customer> customers = new List <Customer>(); foreach (Customer customer in potentialCustomers.Customers) { if (Earth.DistanceBetween(DublinOffice, customer.GpsCoord) <= 100.00) { customers.Add(customer); } } customers.Sort((left, right) => left.Id.CompareTo(right.Id)); return(customers); }
public CustomerManager(ICustomerDB customerDB) { CustomerDB = customerDB; }
public CustomerManager(IConfiguration configuration) { customerDB = new CustomerDB(configuration); }
public CustomerController(ICustomerDB customerDB, ILocationDB locationDB) { this.customerDB = customerDB; this.locationDB = locationDB; }