zoukankan      html  css  js  c++  java
  • 生成需要注意的。


    1. DAL 层只有以下是需要 CodeSmith 动态生成的:TABLENAME、PRIMARYKEYCOLUMNNAME、SQL_INSERT、SQL_UPDATE


    2. 在生成 DAL 层的 CodeSmith 生成代码中,什么一个变量

    string dbParameter = "SqlParameter";  // 如果是 SQL Server ,否则为 MySqlParameter


    3. 在 DAL 层什么一个变量

    string dbHelperName = "MySqlHelper"; 如果是 SQL Server ,否则为 SQLDBHelper


    4. 考虑用继承,提取一个 BaseDAL 类


    5. DAL 层中的封装数据中 string 或 可空字段都要改为:  obj.Name = dr[i] == DBNull.Value ? null : Convert.ToString(dr[i]);

    //------------------------------------------------------------------------------
    // <auto-generated>
    //    This code was generated from a template.
    //
    //    Manual changes to this file may cause unexpected behavior in your application.
    //    Manual changes to this file will be overwritten if the code is regenerated.
    // </auto-generated>
    //------------------------------------------------------------------------------


    6.

  • 相关阅读:
    最小生成树
    线段树
    编程快捷键
    线段树的动态开点
    常用库
    线性求逆元
    文件读入
    树上倍增(LCA)
    set容器
    快读与快写
  • 原文地址:https://www.cnblogs.com/great/p/2428738.html
Copyright © 2011-2022 走看看