Testing code style

 

 

 

学习目的:

/// <summary> 
/// Select Table Data by Invoke Common SP 
/// </summary> 
/// <type name="T">entity Type</type> 
/// <param name="maxRows">Get the Max Rows</param> 
/// <param name="startRow">Start Row Number</param> 
/// <param name="sortExpression">Sort Expression,identify which Column to be order by</param> 
/// <param name="filterString">Filter String. not include the "where" key word</param> 
/// <returns></returns> 
/// <remarks></remarks> 
public virtual List<T> SelectData<T>(int maxRows, int startRow, string sortExpression, string filterString) where T : ModelBase, new()
{
    DataTable dt;
    dt = DataAccess.SelectTableData(DBMethod.GetTableName<T>(), maxRows, startRow, sortExpression, filterString);
    return FillSelectDataToEntity<T>(dt);
}

按照书中的章节有序的了解学习SQL2008的相关知识点,记录下一些知识点、自己的一些想法、或者纯粹的翻译以供日工作应用参考。

1.T-SQL基础

2.T-SQL2008新特性

private OperationResults EditData(ModelBase modelBase)
{
    DoCDNature item = (DoCDNature)modelBase;
    if (this.SelectCount<DoCDNature>(x => x.Code == item.Code && x.NatureID != item.NatureID) > 0)
    {
        return OperationResults.Duplicated;
    }
    else
    {
        this.Update(item);
        return OperationResults.Success;
    }
}

posted on 2009-07-03 22:43  Siulo  阅读(169)  评论(0编辑  收藏  举报

导航