DataBaseLibrary.Utility/EntityHelper.cs

(完整代码) 1KB

#region << 版 本 注 释 >>
/****************************************************
* 文 件 名:EntityHelper.cs
* Copyright(c) 2009-2010
* CLR 版本: 4.0.30319.18408 
* 文件编号:
* 创 建 人:董世星
* 创建日期:2014-11-14 14:32:40
****************************************************** 
* 修 改 人:
* 修改日期:
* 备注描述:
*  
* 
*******************************************************/
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DataBaseLibrary.Utility
{
    /// <summary>
    /// 
    /// </summary>
    public class EntityHelper
    {
        #region 从Model模型中获取数据表名
        /// <summary>
        /// 从Model模型中获取数据表名
        /// </summary>
        public static string GetTableName(Type type)
        {
            PropertyAttribute property = (PropertyAttribute)(type.GetCustomAttributes(false)[0]);
            return property.tableName;
        }
        #endregion
    }
}

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。