Exemplo n.º 1
0
        public static void test()
        {
            Console.WriteLine("Test insert");

            User testUser = new User()
            {
                Email    = "*****@*****.**",
                PhoneNum = "testPhont",
                UserName = "******",
                UserPwd  = "test"
            };
            //dataContext.User.InsertOnSubmit(testUser);
            //dataContext.SubmitChanges();

            EnterPrise enterPrise = new EnterPrise()
            {
                EPName         = "测试企业",
                PhomeNum       = "12313",
                Email          = "*****@*****.**",
                EPScale        = 1,
                ContactInfo    = "sfds",
                EPAbbreviation = "sadf"
            };

            dataContext.EnterPrise.InsertOnSubmit(enterPrise);
            dataContext.SubmitChanges();

            Console.WriteLine("Insert tested");
            Console.WriteLine("Test select");

            foreach (User user in dataContext.User)
            {
                Console.WriteLine(user.PhoneNum);
            }

            Console.WriteLine("Select tested");
        }
Exemplo n.º 2
0
 partial void UpdateEnterPrise(EnterPrise instance);
Exemplo n.º 3
0
 partial void DeleteEnterPrise(EnterPrise instance);
Exemplo n.º 4
0
 partial void InsertEnterPrise(EnterPrise instance);