ClassGenerator(ORM生成器)下载
作者:C/S原创  发布日期:2011/03/21 21:37:12
  ClassGenerator(ORM生成器)下载

ClassGenerator(ORM生成器)下载


ClassGenerator(类生成器)下载

ClassGenerator用于生成实体类模型(ORM模型).


可以生成两种ORM模型:

1. 生成表结构静态类

2. 生成实体类(ORM)

贴图图片


1. 生成表结构静态类


using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using CSFramework.ORM;

namespace CSFramework3.Models
{
   
   ///<summary>
   /// ORM模型, 数据表:Customer,由ClassGenerator自动生成
   /// </summary>
   [ORM_ObjectClassAttribute("Customer", "CustomerCode", true)]
   public sealed class tb_Customer
   {
      public static string __TableName ="Customer";
      
      public static string __KeyName = "CustomerCode";
      
      [ORM_FieldAttribute(SqlDbType.NVarChar,100,false,true,true,false,false)]
      public static string CustomerCode = "CustomerCode";
      
      [ORM_FieldAttribute(SqlDbType.NVarChar,400,false,true,false,false,false)]
      public static string CustomerName = "CustomerName";
      
      [ORM_FieldAttribute(SqlDbType.NVarChar,400,false,true,false,false,false)]
      public static string Address = "Address";
      
      [ORM_FieldAttribute(SqlDbType.NVarChar,100,false,true,false,false,false)]
      public static string Tel = "Tel";
      
      [ORM_FieldAttribute(SqlDbType.NVarChar,100,false,true,false,false,false)]
      public static string Fax = "Fax";
      
   }
}

// 来源:www.CSFramework.com, C/S结构框架学习网



2. 生成实体类(ORM)


using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using CSFramework.ORM;

namespace CSFramework3.Models
{
   ///<summary>
   /// ORM模型, 数据表:Customer,由ClassGenerator自动生成
   /// </summary>
   [ORM_ObjectClassAttribute("Customer", "CustomerCode", true)]
   public sealed class tb_Customer
   {
      #region 所有字段的局部变量定义
      private string F_CustomerCode;
      private string F_CustomerName;
      private string F_Address;
      private string F_Tel;
      private string F_Fax;
      #endregion
      
      public static string __TableName ="Customer";
      
      public static string __KeyName = "CustomerCode";
      
      #region 所有字段名常量
      public const string _CustomerCode = "CustomerCode";
      public const string _CustomerName = "CustomerName";
      public const string _Address = "Address";
      public const string _Tel = "Tel";
      public const string _Fax = "Fax";
      #endregion
      
      #region 所有字段属性
      [ORM_FieldAttribute(SqlDbType.NVarChar,100,false,true,true,false,false)]
      public string CustomerCode{get{return F_CustomerCode;}set{F_CustomerCode=value;}}
      
      [ORM_FieldAttribute(SqlDbType.NVarChar,400,false,true,false,false,false)]
      public string CustomerName{get{return F_CustomerName;}set{F_CustomerName=value;}}
      
      [ORM_FieldAttribute(SqlDbType.NVarChar,400,false,true,false,false,false)]
      public string Address{get{return F_Address;}set{F_Address=value;}}
      
      [ORM_FieldAttribute(SqlDbType.NVarChar,100,false,true,false,false,false)]
      public string Tel{get{return F_Tel;}set{F_Tel=value;}}
      
      [ORM_FieldAttribute(SqlDbType.NVarChar,100,false,true,false,false,false)]
      public string Fax{get{return F_Fax;}set{F_Fax=value;}}
      
      #endregion
   }
}

// 来源:www.CSFramework.com, C/S结构框架学习网


解决方案:

贴图图片


(仅限vip会员下载) 请QQ联系




C/S框架网|原创精神.创造价值.打造精品


扫一扫加作者微信
C/S框架网作者微信 C/S框架网|原创作品.质量保障.竭诚为您服务

点击下载附件 点击下载附件 (如下载失败,请邮件通知我们寄回给您,或QQ:23404761留言.)
上一篇 下一篇