示例#1
0
        private static void Initialize()
        {
            Console.WriteLine("正在初始化数据");

            DataContext.Using(() =>
            {
                {
                    var cmd = new DomainModel.DeleteUser(1);
                    cmd.Execute();

                    cmd = new DomainModel.DeleteUser(2);
                    cmd.Execute();

                    cmd = new DomainModel.DeleteUser(3);
                    cmd.Execute();

                    cmd = new DomainModel.DeleteUser(10);
                    cmd.Execute();
                }

                {
                    var cmd = new DomainModel.CreateUser(3, "崽崽", 0, 0);
                    cmd.Execute();

                    cmd = new DomainModel.CreateUser(2, "新星", 0, 3);
                    cmd.Execute();

                    cmd = new DomainModel.CreateUser(1, "袁俊", 2, 3);
                    cmd.Execute();

                    cmd = new DomainModel.CreateUser(10, "袁俊2", 0, 0);
                    cmd.Execute();
                }
            });
        }
示例#2
0
        protected override DTObject DynamicInvoke(dynamic arg)
        {
            var cmd = new DomainModel.DeleteUser(arg.Id);

            cmd.Execute();
            return(DTObject.Empty);
        }