Beispiel #1
0
        public EditCustomerViewModel(int customerID, int countryID)
        {
            var kupac = Repository.GetCustomer(customerID);

            var country = Repository.GetCountry(countryID, out int firstCityID);

            kupac.GradID = firstCityID;

            Customer = CustomerViewModel.FromKupac(kupac, country);
        }
Beispiel #2
0
 public List <CustomerViewModel> GetCustomersInCurrentLocation()
 => Repository.GetCustomersFrom(Customer.CityID, Customer.CountryID)
 .Select(kupac => CustomerViewModel.FromKupac(kupac))
 .ToList();
Beispiel #3
0
 public List <CustomerViewModel> GetCustomers()
 => Repository.GetCustomers()
 .Select(customer => CustomerViewModel.FromKupac(customer))
 //.Take(10)
 .ToList();
Beispiel #4
0
        public EditCustomerViewModel(int customerID)
        {
            var kupac = Repository.GetCustomer(customerID);

            Customer = CustomerViewModel.FromKupac(kupac);
        }