mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-06-28 13:34:32 +08:00
Update Core
This commit is contained in:
parent
37f9d51c5e
commit
550014e9ee
@ -262,11 +262,11 @@ namespace SqlSugar
|
||||
++i;
|
||||
}
|
||||
}
|
||||
protected string GetDbColumnName(string columns)
|
||||
private string GetDbColumnName(string propertyName)
|
||||
{
|
||||
if (!IsMappingColumns)
|
||||
{
|
||||
return columns;
|
||||
return propertyName;
|
||||
}
|
||||
if (this.Context.MappingColumns.Any(it => it.EntityName.Equals(EntityInfo.EntityName, StringComparison.CurrentCultureIgnoreCase)))
|
||||
{
|
||||
@ -274,12 +274,12 @@ namespace SqlSugar
|
||||
}
|
||||
if (MappingColumnList == null || !MappingColumnList.Any())
|
||||
{
|
||||
return columns;
|
||||
return propertyName;
|
||||
}
|
||||
else
|
||||
{
|
||||
var mappInfo = this.Context.MappingColumns.FirstOrDefault(it => it.EntityName == EntityInfo.EntityName && it.PropertyName.Equals(columns, StringComparison.CurrentCultureIgnoreCase));
|
||||
return mappInfo == null ? columns : mappInfo.DbColumnName;
|
||||
var mappInfo = this.MappingColumnList.FirstOrDefault(it => it.PropertyName.Equals(propertyName, StringComparison.CurrentCultureIgnoreCase));
|
||||
return mappInfo == null ? propertyName : mappInfo.DbColumnName;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -281,11 +281,11 @@ namespace SqlSugar
|
||||
this.UpdateBuilder.Parameters.RemoveAll(it => this.UpdateBuilder.SetValues.Any(v => (SqlBuilder.SqlParameterKeyWord + SqlBuilder.GetNoTranslationColumnName(v.Key)) == it.ParameterName));
|
||||
}
|
||||
}
|
||||
private string GetDbColumnName(string entityName)
|
||||
private string GetDbColumnName(string propertyName)
|
||||
{
|
||||
if (!IsMappingColumns)
|
||||
{
|
||||
return entityName;
|
||||
return propertyName;
|
||||
}
|
||||
if (this.Context.MappingColumns.Any(it => it.EntityName.Equals(EntityInfo.EntityName, StringComparison.CurrentCultureIgnoreCase)))
|
||||
{
|
||||
@ -293,12 +293,12 @@ namespace SqlSugar
|
||||
}
|
||||
if (MappingColumnList == null || !MappingColumnList.Any())
|
||||
{
|
||||
return entityName;
|
||||
return propertyName;
|
||||
}
|
||||
else
|
||||
{
|
||||
var mappInfo = this.Context.MappingColumns.FirstOrDefault(it => it.PropertyName.Equals(entityName, StringComparison.CurrentCultureIgnoreCase));
|
||||
return mappInfo == null ? entityName : mappInfo.DbColumnName;
|
||||
var mappInfo = this.MappingColumnList.FirstOrDefault(it => it.PropertyName.Equals(propertyName, StringComparison.CurrentCultureIgnoreCase));
|
||||
return mappInfo == null ? propertyName : mappInfo.DbColumnName;
|
||||
}
|
||||
}
|
||||
private List<string> GetPrimaryKeys()
|
||||
|
@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@ -26,6 +27,7 @@ namespace SqlSugar
|
||||
/// <summary>
|
||||
/// Configure External Services replace default services,For example, Redis storage
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
public ConfigureExternalServices ConfigureExternalServices = _DefaultServices;
|
||||
private static ConfigureExternalServices _DefaultServices = new ConfigureExternalServices();
|
||||
/// <summary>
|
||||
|
Loading…
Reference in New Issue
Block a user