コード例 #1
0
        public static void updateData()
        {
            Model_EmpContainer m = new Model_EmpContainer();
            EmpDemo            e = m.EmpDemoes.Find(4);

            e.Name = "Paresh";
            m.SaveChanges();
        }
コード例 #2
0
        public static void deleteData()
        {
            Model_EmpContainer m = new Model_EmpContainer();
            EmpDemo            e = m.EmpDemoes.Find(3);

            m.EmpDemoes.Remove(e);
            m.SaveChanges();
        }
コード例 #3
0
        public static void insertData()
        {
            Model_EmpContainer m = new Model_EmpContainer();
            EmpDemo            e = new EmpDemo();

            e.Id         = 01;
            e.Name       = "Ajay";
            e.Salary     = 30000;
            e.DeptDemoId = 01;
            m.EmpDemoes.Add(e);
            m.SaveChanges();
        }