• 公司框架DAO模板


    <%@ CodeTemplate Language="C#" TargetLanguage="T-SQL" Debug="true" CompilerVersion="v3.5" Description="" %>
    <%@ Assembly Name="SchemaExplorer" %>
    <%@ Property Name="SourceTable" Type="SchemaExplorer.TableSchema" Optional="False" Category="Required" %>
    <%@ Property Name="NameSpace" Optional="False" Type="System.String" Default="Beyondbit.App.Entity" Category="Style" Description="Object Namespace." %>
    //----------------------------------------------------------------
    // Copyright (C) 2012 上海互联网软件有限公司
    // 版权所有.
    // All rights reserved.
    //
    // 文件名: DAO<%= SourceTable %>.cs
    // 文件功能描述:
    //
    // 创建标识: <%= DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss") %>
    //
    // 修改标识:
    // 修改描述:
    //----------------------------------------------------------------
    using System;
    using System.Collections.Generic;
    using System.Text;
    using Beyondbit.Framework.DataAccess.ObjectDAO;
    using Beyondbit.DocumentSpare.Entity;
    using System.Data;
    using Beyondbit.Core.Common.Tools;

    namespace Beyondbit.DocumentSpare.DAO
    <%--
    SourceTable.Columns[i].ExtendedProperties[]
    ==CS_IsRowGuidCol
    ==CS_IsIdentity
    ==CS_IsComputed
    ==CS_IsDeterministic
    ==CS_IdentitySeed
    ==CS_IdentityIncrement
    ==CS_Default
    ==CS_ComputedDefinition
    ==CS_Collation
    ==CS_ObjectID
    ==CS_SystemType
    ==CS_UserType
    ==MS_Description
    ==CS_Description
    --%>

    namespace <%=NameSpace%> {

    public class DAO<%=SourceTable.Name%> : ObjectDAO<<%=SourceTable.Name%>> {
    public SplitPageResult<<%=SourceTable.Name%>> Query<%=SourceTable.Name%>Info(PageSearch pSearch,string Condition)
    {
    string strSql = "Select * From <%=SourceTable.Name%> Where 1=1 ";

    if (Condition != null && Condition != "")
    {
    strSql += Condition;
    }

    if (pSearch.SortFields == string.Empty)
    pSearch.SortFields = "CreateTime";


    return base.QuerySplitPage(strSql, "*", pSearch.SortFields, pSearch.PageSize,
    pSearch.PageIndex, null);
    }
    }
    }

  • 相关阅读:
    BZOJ 1037: [ZJOI2008]生日聚会Party 四维DP
    Codeforces Round #240 (Div. 1) B. Mashmokh and ACM DP
    Codeforces Round #319 (Div. 2)B. Modulo Sum DP
    浅谈移动端页面无刷新跳转问题的解决方案
    2017年10大主流编程语言最新排行榜出炉
    2017年10大主流编程语言最新排行榜出炉
    验证码倒计时的注册页面
    仿百度地图上拉下滑抽屉盒
    仿百度地图上拉下滑抽屉盒
    微信小游戏跳一跳外挂教程(安卓版)
  • 原文地址:https://www.cnblogs.com/yuanxiaoping_21cn_com/p/2803935.html
Copyright © 2020-2023  润新知