예제 #1
0
        //public ShachlavDB2 db = new ShachlavDB2();


        public void Test()
        {
            using (ShachlavDB2 TestDb = new ShachlavDB2())
            {
                //TestDb.Material.Add(new Material() { Id = 1, Name = "tt1111" });
                TestDb.Customers.Add(new Customer()
                {
                    Id = 1, FirstName = "Pnina", LastName = "Menachem", CompanyName = "aa", BusinessCode = "12", Email = "[email protected]", PhoneNumber = "08974001", CellNumber = "0527180225", Address = "Netivot Hamishpat 86 Moddin I", UserName = "******", Password = "******", BirthDate = DateTime.Today
                });
                TestDb.SaveChanges();
            }
        }
예제 #2
0
        public void addCustomer(CustomerDto c)
        {
            //bl.Test();

            Customer c1 = DtoToDal(c);

            if (!IsExists(c1))
            {
                db.Customers.Add(new Customer()
                {
                    Id = 1, IdentityNumber = "253810000", FirstName = "Pnina", LastName = "Menachem", CompanyName = "aa", BusinessCode = "12", Email = "[email protected]", PhoneNumber = "08974001", CellNumber = "0527180225", Address = "Netivot Hamishpat 86 Moddin I", UserName = "******", Password = "******", BirthDate = DateTime.Today
                });
            }
            db.SaveChanges();
        }