当前位置: 首页 > 工具软件 > Mustang > 使用案例 >

Mustang 1.0.0.0例子说明

冉子石
2023-12-01
Examples Information
示例映射文件说明
1QuickStart QuickStart.uim.xml快速示例
2Use ORM ORM.uim.xml 在示例一的基础上,加上了ORM(NHibernate)
3Object Cascade Cascade.uim.xml对象引用关系的映射示例
4Complex Property ComplexProperty.uim.xml对复杂属性的分解示例。在该示例中,属性的内容是形如:City=eijingB&School=NCC的格式,它会被映射到界面的多个控件
要执行2,3,4示例必须先执行以下几步:
1)创建一个SqlServer数据库,并同步修改Web.Config中的设置
<nhibernate>
    ...
    <add key="hibernate.connection.connection_string" value="data datesource=???;initial catalog= ???;userid=???;password=???;"
    ...
</nhibernate>
2)执行以下的SQL语句
CREATE TABLE SysUser (
[UserID] [int] IDENTITY (1, 1) NOT NULL , [UserName] [nvarchar] (100) NULL , [LoginID] [nvarchar] (100) NULL , [Password] [nvarchar] (100) NULL , [Email] [varchar] (100) NULL , [PostCode] INT NULL , [Birthday] [smalldatetime] NULL , [Mobile] [nvarchar] (100) NULL , [Gender] [int] NULL , [UserGroupID] [int] NULL , [Status] [char] (1) NULL, [Standby1] [nvarchar] (500) NULL
)
GO
INSERT INTO SysUser(UserName, LoginID, [Password], Email,PostCode, Birthday, Mobile, Gender, UserGroupID, Status, standby1)
VALUES('michael sheen', 'michael', '', 'xxx@xxx.com', '100068', '1999-09-09', '13912345678', '1', '1', '1', '' )
GO
CREATE TABLE [SysUserGroup] ( [UserGroupID] [int] IDENTITY (1, 1) NOT NULL , [UserGroupName] [nvarchar] (100) NULL , [Description] [nvarchar] (100) NULL , [Status] [char] (1) NULL )
GO
INSERT INTO SysUserGroup (UserGroupName, [Description], Status) VALUES('Admin', 'Administrator', '1')
INSERT INTO SysUserGroup (UserGroupName, [Description], Status) VALUES('User', 'Normal User', '1')

转载于:https://www.cnblogs.com/microsheen/archive/2005/08/28/224609.html

 类似资料: