static void Main(string[] args) { CustomerManager manager = new CustomerManager(); manager.Add(); manager.Delete(); ProductManager productManager = new ProductManager(); productManager.Add(); productManager.Delete(); productManager.Update(); Customer customer = new Customer(); customer.Id = 2; customer.City = "City"; customer.Name = "Name 1"; customer.SurName = "Surname"; Customer customer2 = new Customer { Id = 1, SurName = "Surname 2", City = "Ciy2", Name = "Name 1" }; Console.WriteLine(customer2.Name); Console.ReadLine(); }
static void Main(string[] args) { // Classlar, yapılmak istenen işlemleri gruplara ayırmak, gruplar üzerinden işlemleri yapmak ve gruba ulaşmak için kullanılırı. CustomerManager customerManager = new CustomerManager(); // Class'ın bir örneğini, referansını oluşturma customerManager.Add(); customerManager.Update(); customerManager.Delete(); ProductManager productManager = new ProductManager(); // Class'ın bir örneğini, referansını oluşturma productManager.Add(); productManager.Update(); productManager.Delete(); // İşlemleri gruplamış olduk. En temel özelliktir gruplama: Müşteri ile ilgili işlemler, Ürün ile ilgili işlemler. Customer customer1 = new Customer(); customer1.CustomerId = 0; // set bloğu çalışır customer1.FirstName = "İrem"; // set bloğu çalışır customer1.LastName = "Çalışkan"; // set bloğu çalışır customer1.City = "İstanbul"; // set bloğu çalışır Customer customer2 = new Customer() { CustomerId = 1, FirstName = "Ceren", LastName = "Çalışkan", City = "İstanbul" }; Console.WriteLine(customer2.FirstName); // get bloğu çalışır }
static void Main(string[] args) { CustomerManager customerManager = new CustomerManager(); customerManager.Add(); customerManager.Delete(); customerManager.update(); ProductManager productManager = new ProductManager(); productManager.update(); productManager.Delete(); productManager.Add(); Customer customer = new Customer(); customer.City = "Ankara"; customer.FirstName = "Alp"; customer.LastName = "Esen"; Customer customer2 = new Customer { FirstName = "asd", LastName = "sdasd", City = "asdas" }; Console.WriteLine(customer2.FirstName); Console.ReadLine(); }
static void Main(string[] args) { Customer customer = new Customer { Id = 1, FirstName = "Emircan", LastName = "Dalman" }; CustomerManager customerManager = new CustomerManager(); customerManager.Add(customer); customerManager.Delete(customer); }
static void Main(string[] args) { CustomerManager customerManager = new CustomerManager(); customerManager.Add(); customerManager.Read(); customerManager.Update(); customerManager.Delete(); Console.ReadLine(); ProductManager productManager = new ProductManager(); productManager.Add(); productManager.Read(); productManager.Update(); productManager.Delete(); Console.ReadLine(); Customer customer = new Customer(); customer.Id = 1; customer.FirstName = "Cem"; customer.LastName = "Kırmızı"; customer.City = "Argentina"; //other Customer customer2 = new Customer() { Id = 2, FirstName = "Yılmaz", LastName = "Turuncu", City = "Cuba" }; Console.WriteLine(customer.City); Console.WriteLine(customer2.City); Console.ReadLine(); }
static void Main(string[] args) { Customer customer = new Customer(); customer.City = "Ankara"; customer.Name = "Yagmur"; customer.Id = 1; Customer customer2 = new Customer { Id = 2, City = "Antalya", Name = "Unsal" }; Console.WriteLine("Ilk musteri : " + customer.Name + "\nBulundugu Sehir : " + customer.City); CustomerManager manager = new CustomerManager(); manager.Add(); Console.WriteLine("Ikinci musteri : " + customer2.Name + "\nBulundugu Sehir : " + customer2.City); manager.Delete(); }