Exemplo n.º 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);
        }
Exemplo n.º 2
0
 public List <CustomerViewModel> GetCustomersInCurrentLocation()
 => Repository.GetCustomersFrom(Customer.CityID, Customer.CountryID)
 .Select(kupac => CustomerViewModel.FromKupac(kupac))
 .ToList();
Exemplo n.º 3
0
 public List <CustomerViewModel> GetCustomers()
 => Repository.GetCustomers()
 .Select(customer => CustomerViewModel.FromKupac(customer))
 //.Take(10)
 .ToList();
Exemplo n.º 4
0
        public EditCustomerViewModel(int customerID)
        {
            var kupac = Repository.GetCustomer(customerID);

            Customer = CustomerViewModel.FromKupac(kupac);
        }