public static string GetFieldName(Type type, string propertyName) { string fieldName = ReflectionExtendHelper.GetAttributeValue <DataBaseTAttribute>(type, propertyName, p => p.Name); if (!string.IsNullOrEmpty(fieldName)) { return(fieldName); } return(propertyName); }
public static string GetTableName(Type type) { string tableName = ReflectionExtendHelper.GetAttributeValue <DataBaseTAttribute>(type, p => p.Name); if (!string.IsNullOrEmpty(tableName)) { return(tableName); } return(type.Name); }