资源简介
generates IBatisNet SQL mapping file and a group of CSharp classes from a database table.
产生IBatisNET的SQL映射文件和三层代码
Output for each database table
Entity, the C# class that represents a database record.
DaoIntf, the C# DAO interface contains a group of data manipulation methods, such as:
GetCount,
代码片段和文件信息
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.objectModel;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.IO;
using System.Text;
using System.xml;
using System.xml.Schema;
using System.xml.Serialization;
using CodeSmith.Engine;
using CodeSmith.baseTemplates;
using CodeSmith.CustomProperties;
using SchemaExplorer;
namespace CSBatisBuilder {
#region Enums
/// Controls the access modifier of Property/MemberVariable generation.
public enum MemberAccess { Public Protected ProtectedInternal Internal Private }
/// IdPattern specifies the pattern of statement id.
public enum StmtIdPattern { Local Classified NamespaceClassified }
/// The enum of database vendors.
/// Each implemenator class of should have a corresponding value in this enum.
/// Currently only Micorsoft SQL Server ( ) implemented.
public enum DbVendorId { SQLServer }
#endregion
#region Categories
/// String constants for .
public class Categories {
public const String Data = “Data“;
public const String Options = “Options“;
public const String Output = “Output“;
public const String DebugInfo = “DebugInfo“;
}
#endregion
#region ClassOption
/// ClassOption is the base class for customizing a C# type.
[TypeConverter(typeof(ExpandableobjectConverter))]
[PropertySerializer(typeof(xmlPropertySerializer))]
public abstract class ClassOption {
#region Namespace
private String m_Namespace;
[Optional]
[Description(“(Recommanded) The namespace of the generated class.“)]
public String Namespace {
get { return m_Namespace; }
set { m_Namespace = (value != null) ? value.Trim() : String.Empty; }
}
#endregion
#region Assembly
private String m_Assembly;
[Optional]
[Description(“The assembly name defult to the Namespace.“)]
public String Assembly {
get { return m_Assembly; }
set { m_Assembly = (value != null) ? value.Trim() : null; }
}
#endregion
#region baseType
private String m_baseType;
[Optional]
[Description(“(Optional) base class name and/or interfance(s).“)]
public String baseType {
get { return m_baseType; }
set { m_baseType = (value != null) ? value.Trim() : null; }
}
#endregion
#region IsPartial
private const bool m_DefaultIsPartial = true;
private bool m_IsPartial = m_DefaultIsParti
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 90399 2007-02-20 11:51 CSBatisBuilder.cs
文件 7142 2007-02-18 20:38 IBatisNetGen.BatisMap.cst
文件 8604 2007-02-18 15:01 IBatisNetGen.DaoImpl.cst
文件 5634 2007-02-18 14:43 IBatisNetGen.DaoIntf.cst
文件 3845 2007-02-18 22:05 IBatisNetGen.Databa
文件 2320 2007-02-18 14:32 IBatisNetGen.Entity.cst
文件 13439 2007-02-22 19:29 IBatisNetGen.html
----------- --------- ---------- ----- ----
131383 7
评论
共有 条评论