Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            var  customerManager = new HotelBusiness.ConCrete.CustomerManager();
            var  personelManager = new HotelBusiness.ConCrete.PersonelManager();
            bool result          = customerManager.Insert(new HotelEntities.Customer {
                Id = 1, FirsName = "Yasin", LastName = "Çınar", EMail = "aaa", TcNo = "12132132"
            });
            bool result2 = personelManager.Insert(new HotelEntities.Personel {
                Id = 2, FirsName = "Ahmet", LastName = "Sefa", Salary = null, Adress = ""
            });



            if (result)
            {
                Console.WriteLine("müşteri Eklendi");
            }
            else
            {
                Console.WriteLine("müşteri Eklenmedi!!");
            }

            if (result2)
            {
                Console.WriteLine("personel Eklendi");
            }
            else
            {
                Console.WriteLine("personel Eklenmedi!!");
            }
        }
Ejemplo n.º 2
0
        public ActionResult Index()
        {
            var  customerManager = new HotelBusiness.ConCrete.CustomerManager();
            var  personelManager = new HotelBusiness.ConCrete.PersonelManager();
            bool result          = customerManager.Insert(new HotelEntities.Customer {
                FirsName = "YDenem", LastName = "Çınar", E_mail = "aaa", TcNo = "12132132"
            });
            bool result2 = personelManager.Insert(new HotelEntities.Personel {
                FirsName = "Umut", LastName = "Sefa", Salary = null, Adress = "Gonya"
            });

            return(View());
        }