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

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

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

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