ClassGenerator(ORM生成器)下载


  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框架网|原创作品.质量保障.竭诚为您服务

版权声明:本文为开发框架文库发布内容,转载请附上原文出处连接
C/S框架网
上一篇:SQLServer连接配置工具(配置保存到ini文件或系统注册表)
下一篇:开发应用-职责链模式(Chain Of Resposibility Pattern)
评论列表

发表评论

评论内容
昵称:
关联文章

ClassGenerator(ORM生成器)下载
ClassGenerator V2.01 生成的ORM源码
源码生成器(ClassGenerator)修改一处Bug
代码生成器 CodeGenerator - 生成ORM
CSFramework代码生成器生成三种ORM模型类(静态类ORM,实体类ORM,标准对象)
ClassGenerator V2.01 生成的DAL源码
CSFrameworkV6旗舰版-使用代码生成器工具生成ORM、BLL、DAL代码
CSFrameworkV6旗舰版-使用代码生成器工具生成ORM、BLL、DAL代码
CSFramework.CodeGenerator V6.0 代码生成器下载
ClassGenerator V2.01 生成的BLL源码
C#.Net快速开发框架 - ORM ,BLL,DAL三者关系
ORM模型介绍(ORM Model)- CSFramework.WebApi服务端框架
开发框架支持的两种ORM模型(静态类/实体类)
代码生成器生成ORM报错:不能在 colLength 列中存储 <18,2>。所需类型是 Int32。
CS系统快速开发框架 - 生成主从表的ORM
代码生成器 CodeGenerator - 代码生成器主界面
SQL命令生成器:GenerateSqlCmdByTableFields,GenerateSqlCmdByObjectClass
ORM_TableAttribute类详解:资料表特性定义
什么是ORM?
代码生成器的工具的用法如何与快速开发模块结合应用呢?