mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-09-20 02:29:24 +08:00
fix webapi 未设置代码生成 Load加载数据报错,MVC页面没有代码生成界面 https://gitee.com/yubaolee/OpenAuth.Core/issues/I4RLEP
This commit is contained in:
@@ -34,13 +34,14 @@ namespace OpenAuth.App
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取数据库一个表的所有属性值及属性描述
|
||||
/// 通过实体获取字段定义,因为MVC版本没有代码生成界面,只能通过这种方式
|
||||
/// </summary>
|
||||
/// <param name="moduleName">模块名称/表名</param>
|
||||
/// <returns></returns>
|
||||
public List<KeyDescription> GetProperties(string moduleName)
|
||||
[Obsolete("因为MVC版本没有代码生成界面,只能通过这种方式")]
|
||||
public List<BuilderTableColumn> GetTableColumnsFromDb(string moduleName)
|
||||
{
|
||||
var result = new List<KeyDescription>();
|
||||
var result = new List<BuilderTableColumn>();
|
||||
const string domain = "openauth.repository.domain.";
|
||||
IEntityType entity = null;
|
||||
_contexts.ForEach(u =>
|
||||
@@ -67,12 +68,13 @@ namespace OpenAuth.App
|
||||
{
|
||||
typeName = Nullable.GetUnderlyingType(property.PropertyType).Name;
|
||||
}
|
||||
result.Add(new KeyDescription
|
||||
result.Add(new BuilderTableColumn
|
||||
{
|
||||
Key = property.Name,
|
||||
Description = description,
|
||||
Browsable = browsable,
|
||||
Type = typeName
|
||||
ColumnName = property.Name,
|
||||
TableName = moduleName,
|
||||
Comment = description,
|
||||
IsList = browsable,
|
||||
ColumnType = typeName
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user