mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2026-01-24 05:42:01 +08:00
Update entity manager
This commit is contained in:
@@ -170,7 +170,15 @@ namespace SqlSugar
|
||||
/// <returns>the code annotation for the database table</returns>
|
||||
public string GetTableAnnotation(Type entityType)
|
||||
{
|
||||
return GetXElementNodeValue(entityType, $"T:{entityType.FullName}");
|
||||
var result= GetXElementNodeValue(entityType, $"T:{entityType.FullName}");
|
||||
if (string.IsNullOrEmpty(result))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
else
|
||||
{
|
||||
return result;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets the code annotation for the field
|
||||
@@ -180,7 +188,15 @@ namespace SqlSugar
|
||||
/// <returns>the code annotation for the field</returns>
|
||||
public string GetPropertyAnnotation(Type entityType, string dbColumnName)
|
||||
{
|
||||
return GetXElementNodeValue(entityType, $"P:{entityType.FullName}.{dbColumnName}");
|
||||
var result= GetXElementNodeValue(entityType, $"P:{entityType.FullName}.{dbColumnName}");
|
||||
if (string.IsNullOrEmpty(result))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
else
|
||||
{
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
#region Primary key
|
||||
|
||||
Reference in New Issue
Block a user