Пример #1
0
 public ManagerDto getManager(int id)
 {
     using (var db1 = new ShachlavDB2())
     {
         Manager m = db1.Manager.FirstOrDefault(m1 => m1.Id == id);
         return(ManagerToDto(m));
     }
 }
Пример #2
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();
            }
        }