Beispiel #1
0
        private static void Edit()
        {
            Lxrenb lxre = DbEntities.Lxrenb.FirstOrDefault(l => l.xm == "张杰");

            ShowInfo(lxre);
            lxre.xm = "胡睿毅";
            ShowInfo(lxre);
            DbEntities.SaveChanges();
        }
Beispiel #2
0
        private static void Add()
        {
            Lxrenb lxr = new Lxrenb {
                xm = "张杰", lbdm = 1, sjhm = "12345678912", qq = "123456789"
            };

            DbEntities.Lxrenb.Add(lxr);
            DbEntities.SaveChanges();
        }
Beispiel #3
0
        private static void Delete()
        {
            Lxrenb lxren = new Lxrenb {
                lxrenbh = 2652
            };

            DbEntities.Lxrenb.Attach(lxren);
            DbEntities.Lxrenb.Remove(lxren);
            DbEntities.SaveChanges();
        }
Beispiel #4
0
 private static void Printinfo(Lxrenb m)
 {
     Console.WriteLine(m.xm + "  " + m.xmsx + "  " + m.sjhm + "   " + m.qq + "   " + m.lbdm);
 }
Beispiel #5
0
 public static void ShowInfo(Lxrenb m)
 {
     Console.WriteLine(m.xm + "  " + m.xmsx + "  " + m.sjhm + "   " + m.qq + "   " + m.lbdm);
 }