static void Main(string[] args) { CarRentalServicesDBContext _context = new CarRentalServicesDBContext(); //var car = new Car{ // Brand = "Tesla", // Model = "X", // Year = 2016, // Regnumber = "test" //}; //var addCar = carMethods.AddCar(car); //_context.SaveChanges(); var cust = new Customer { FirstName = "Ramin", LastName = "Runesson", Phone = "0703454545", Email = "*****@*****.**" }; methods.ChangeCustomer(cust); List <Customer> customers = methods.GetAllCustomers(); foreach (Customer c in customers) { Write(c.FirstName); } ReadKey(); }
public string GetAllCustomer() { List <Customer> customers = customerMethods.GetAllCustomers(); var json = JsonConvert.SerializeObject(customers); return(json); }
public List <Customer> GetAllCustomers() { return(customerMethods.GetAllCustomers()); }