SqlProvider.cst 数据提供者的具体实现

  1<%-- 
  2Name:
  3Author: 
  4Description: 
  5--%>
  6<%@ CodeTemplate Language="C#" ResponseEncoding="UTF-8" TargetLanguage="Text" Src="Helper.cs" Inherits="Helper" Debug="False" Description="Template description here." %>
  7<%@ Property Name="NameSpace" Type="System.String" Default="" Optional="false" Category="1.命名空间" Description="当前生成命名空间" %>
  8<%@ Property Name="DataBase" Type="SchemaExplorer.DatabaseSchema" Category="2.数据库对象"
  9    Description="数据库对象" %>
 10<%@ Property Name="ModuleName" Type="System.String" Default="" Optional="false" Category="" Description="项目名称" %>
 11
 12<%@ Assembly Name="System.Data" %>
 13<%@ Assembly Name="SchemaExplorer" %>
 14<%@ Assembly Name="CodeSmith.BaseTemplates" %>
 15<%@ Import Namespace="System.Data" %>
 16<%@ Import Namespace="SchemaExplorer" %>
 17<%@ Import Namespace="CodeSmith.BaseTemplates" %>
 18using System;
 19using System.Collections.Generic;
 20using System.Text;
 21using System.Collections.Specialized;
 22using System.Data;
 23using System.Data.SqlClient;
 24using System.Configuration.Provider;
 25using System.Web.Configuration;
 26using System.Diagnostics;
 27using System.Reflection;
 28
 29namespace <%= NameSpace%>.Providers
 30{
 31   /// <summary>
 32   /// 数据提供者具体实现类
 33   /// </summary>

 34   public partial class Sql<%= ModuleName%>Provider : <%= ModuleName%>Provider
 35   {
 36      系统设置
145<%
146    foreach(TableSchema Table in DataBase.Tables)
147    {
148%>
149
150      %
334<%
335    }

336%>
337   }

338
339
340
341}

342
343<script runat="template">
344public string GetDBNullValue(ColumnSchema column)
345{
346    return "";
347}

348</script>
posted @ 2007-07-05 20:02  吴碧宇  阅读(502)  评论(1编辑  收藏  举报