发布VCSFramework ORM V0.9 bata(下载)

大家看了架构后,有什么Question建议,请回复.我好修改修改一下
注:要使用生器,则必须安装Codesmith3.2,因为我的生成器里使用了Codesmith的Schema.

由于这是Bata版,对数据库的设计有一点要求,详细请看文档

如果要转载,请注明出入 

使用说明:
在SRC.rar里面
com.Robert.AccountTestFramework是由代码生成的工程,
数据库在 sql.sql,新建一个数据库后运行两次sql.sql(第一次会报错)就行了。
数据库联接不在Web.Config里,而是写在com.Robert.AccountTestFramework\ConnectionHelper\ConnectionHelper.cs
的GetConnectionString()函数里


源码
生成器(更新)
生成器说明文档
文档

如果有什么建议,请到 http://vcsproject.com/forums/3/ShowForum.aspx
如果要获取更多的信息,请到 http://vcsproject.com/forums/3/ShowForum.aspx

下面是代码的剪辑:

ContractedBlock.gif ExpandedBlockStart.gif
  1None.gif
  2None.gifusing System;
  3None.gifusing System.Data;
  4None.gifusing com.Robert.Framework;
  5None.gif
  6None.gif
  7None.gifnamespace com.EBiz
  8ExpandedBlockStart.gifContractedBlock.gifdot.gif{
  9ExpandedSubBlockStart.gifContractedSubBlock.gif    /**//// <summary>
 10InBlock.gif    /// 
 11ExpandedSubBlockEnd.gif    /// </summary>

 12InBlock.gif    [Serializable]
 13InBlock.gif    public partial class COMM_User
 14ExpandedSubBlockStart.gifContractedSubBlock.gif    dot.gif{
 15InBlock.gif        
 16InBlock.gif        public COMM_User()
 17ExpandedSubBlockStart.gifContractedSubBlock.gif        dot.gif{
 18InBlock.gif            this._data = new COMM_UserData();
 19InBlock.gif
 20InBlock.gif            this.UserID = Guid.NewGuid();
 21InBlock.gif                                
 22ExpandedSubBlockEnd.gif        }

 23InBlock.gif
 24InBlock.gif        public COMM_User(Guid ID)
 25ExpandedSubBlockStart.gifContractedSubBlock.gif        dot.gif{
 26InBlock.gif            this._data = new COMM_UserManager().GetCOMM_UserByID(ID)._data;
 27ExpandedSubBlockEnd.gif        }

 28InBlock.gif            
 29InBlock.gif
 30ContractedSubBlock.gifExpandedSubBlockStart.gif        Property#region Property
 31InBlock.gif
 32InBlock.gif        
 33InBlock.gif
 34InBlock.gif        public virtual MyGuid UserID
 35ExpandedSubBlockStart.gifContractedSubBlock.gif        dot.gif{
 36ExpandedSubBlockStart.gifContractedSubBlock.gif            get dot.gifreturn ((COMM_UserData) this.ObjectData).UserID; }
 37ExpandedSubBlockStart.gifContractedSubBlock.gif            set dot.gif{((COMM_UserData) this.ObjectData).UserID=value;}
 38ExpandedSubBlockEnd.gif        }

 39InBlock.gif
 40InBlock.gif        public virtual MyGuid OldUserID
 41ExpandedSubBlockStart.gifContractedSubBlock.gif        dot.gif{
 42ExpandedSubBlockStart.gifContractedSubBlock.gif            get dot.gifreturn ((COMM_UserData) this.ObjectData).OldUserID; }
 43ExpandedSubBlockEnd.gif        }

 44InBlock.gif
 45InBlock.gif                    
 46InBlock.gif
 47InBlock.gif        public virtual string UserName
 48ExpandedSubBlockStart.gifContractedSubBlock.gif        dot.gif{
 49ExpandedSubBlockStart.gifContractedSubBlock.gif            get dot.gifreturn ((COMM_UserData) this.ObjectData).UserName; }
 50ExpandedSubBlockStart.gifContractedSubBlock.gif            set dot.gif{((COMM_UserData) this.ObjectData).UserName=value;}
 51ExpandedSubBlockEnd.gif        }

 52InBlock.gif
 53InBlock.gif        public virtual string OldUserName
 54ExpandedSubBlockStart.gifContractedSubBlock.gif        dot.gif{
 55ExpandedSubBlockStart.gifContractedSubBlock.gif            get dot.gifreturn ((COMM_UserData) this.ObjectData).OldUserName; }
 56ExpandedSubBlockEnd.gif        }

 57InBlock.gif
 58InBlock.gif                    
 59InBlock.gif
 60InBlock.gif        public virtual string Password
 61ExpandedSubBlockStart.gifContractedSubBlock.gif        dot.gif{
 62ExpandedSubBlockStart.gifContractedSubBlock.gif            get dot.gifreturn ((COMM_UserData) this.ObjectData).Password; }
 63ExpandedSubBlockStart.gifContractedSubBlock.gif            set dot.gif{((COMM_UserData) this.ObjectData).Password=value;}
 64ExpandedSubBlockEnd.gif        }

 65InBlock.gif
 66InBlock.gif        public virtual string OldPassword
 67ExpandedSubBlockStart.gifContractedSubBlock.gif        dot.gif{
 68ExpandedSubBlockStart.gifContractedSubBlock.gif            get dot.gifreturn ((COMM_UserData) this.ObjectData).OldPassword; }
 69ExpandedSubBlockEnd.gif        }

 70InBlock.gif
 71InBlock.gif                    
 72InBlock.gif
 73InBlock.gif        public virtual MyInt PermissionTypeCode
 74ExpandedSubBlockStart.gifContractedSubBlock.gif        dot.gif{
 75ExpandedSubBlockStart.gifContractedSubBlock.gif            get dot.gifreturn ((COMM_UserData) this.ObjectData).PermissionTypeCode; }
 76ExpandedSubBlockStart.gifContractedSubBlock.gif            set dot.gif{((COMM_UserData) this.ObjectData).PermissionTypeCode=value;}
 77ExpandedSubBlockEnd.gif        }

 78InBlock.gif
 79InBlock.gif        public virtual MyInt OldPermissionTypeCode
 80ExpandedSubBlockStart.gifContractedSubBlock.gif        dot.gif{
 81ExpandedSubBlockStart.gifContractedSubBlock.gif            get dot.gifreturn ((COMM_UserData) this.ObjectData).OldPermissionTypeCode; }
 82ExpandedSubBlockEnd.gif        }

 83InBlock.gif
 84InBlock.gif                    
 85InBlock.gif
 86ContractedSubBlock.gifExpandedSubBlockStart.gif        List#region List
 87ExpandedSubBlockEnd.gif        #endregion

 88InBlock.gif
 89ContractedSubBlock.gifExpandedSubBlockStart.gif        object info#region object info
 90ExpandedSubBlockEnd.gif        #endregion

 91InBlock.gif
 92ExpandedSubBlockEnd.gif        #endregion

 93InBlock.gif
 94InBlock.gif        
 95ContractedSubBlock.gifExpandedSubBlockStart.gif        Operation#region Operation
 96InBlock.gif
 97InBlock.gif        public virtual COMM_User Clone()
 98ExpandedSubBlockStart.gifContractedSubBlock.gif        dot.gif{
 99InBlock.gif            COMM_User m_obj = new COMM_User();
100InBlock.gif            m_obj._data = this.ObjectData.Clone();
101InBlock.gif            return m_obj;
102ExpandedSubBlockEnd.gif        }

103InBlock.gif
104InBlock.gif        protected override BaseProfile GetProfile()
105ExpandedSubBlockStart.gifContractedSubBlock.gif        dot.gif{
106InBlock.gif            return new COMM_UserProfile(this);
107ExpandedSubBlockEnd.gif        }

108InBlock.gif        
109InBlock.gif
110ExpandedSubBlockEnd.gif        #endregion

111InBlock.gif
112InBlock.gif        public override bool Equals(object obj)
113ExpandedSubBlockStart.gifContractedSubBlock.gif        dot.gif{
114InBlock.gif            if (obj is COMM_User)
115ExpandedSubBlockStart.gifContractedSubBlock.gif            dot.gif{
116InBlock.gif                return this.UserID == ((COMM_User)obj).UserID;
117ExpandedSubBlockEnd.gif            }

118InBlock.gif            else
119ExpandedSubBlockStart.gifContractedSubBlock.gif            dot.gif{
120InBlock.gif                return base.Equals(obj);
121ExpandedSubBlockEnd.gif            }

122ExpandedSubBlockEnd.gif        }

123InBlock.gif        public override int GetHashCode()
124ExpandedSubBlockStart.gifContractedSubBlock.gif        dot.gif{
125InBlock.gif            return base.GetHashCode();
126ExpandedSubBlockEnd.gif        }

127InBlock.gif                        
128ExpandedSubBlockEnd.gif    }

129ExpandedBlockEnd.gif}

130None.gif

 使用的代码剪辑:
新增,修改

 1 ExpandedBlockStart.gif ContractedBlock.gif      /**/ /// </summary>
 2 None.gif      private   void  SaveData()
 3 ExpandedBlockStart.gifContractedBlock.gif     dot.gif {
 4InBlock.gif        com.EBiz.COMM_User m_obj;
 5InBlock.gif
 6InBlock.gif        if (this.ObjectID == Guid.Empty)
 7ExpandedSubBlockStart.gifContractedSubBlock.gif        dot.gif{
 8InBlock.gif            //新增,不用ID去构造
 9InBlock.gif            m_obj = new com.EBiz.COMM_User();
10ExpandedSubBlockEnd.gif        }

11InBlock.gif        else
12ExpandedSubBlockStart.gifContractedSubBlock.gif        dot.gif{
13InBlock.gif            //修改
14InBlock.gif            m_obj = new com.EBiz.COMM_User(this.ObjectID);
15ExpandedSubBlockEnd.gif        }

16InBlock.gif        m_obj.UserName = this.txtUserNo.Text;
17InBlock.gif        m_obj.Password = this.txtPwd.Text;
18InBlock.gif        m_obj.PermissionTypeCode = this.ddlUserType.SelectedValue;
19InBlock.gif        m_obj.Save();
20ExpandedBlockEnd.gif    }

转载于:https://www.cnblogs.com/luoqing/archive/2006/04/13/374241.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值