This commit is contained in:
sunkaixuan
2017-05-01 23:56:45 +08:00
parent f86f2127c5
commit b14c75f21e
2 changed files with 25 additions and 9 deletions

View File

@@ -70,6 +70,8 @@ namespace SqlSugar
private void PreToSql()
{
#region Identities
if (this.Context.IsSystemTablesConfig)
{
List<string> identities = Db.DbMaintenance.GetIsIdentities(this.InsertBuilder.TableName);
if (identities != null && identities.Any())
{
@@ -79,6 +81,10 @@ namespace SqlSugar
return !identities.Any(i => it.ColumnName.Equals(i, StringComparison.CurrentCultureIgnoreCase));
}).ToList();
}
}
else {
}
#endregion
#region IgnoreColumns

View File

@@ -15,6 +15,16 @@ namespace SqlSugar
/// </summary>
public partial class SqlSugarClient : SqlSugarAccessory, IDisposable
{
#region Properties
public bool IsSystemTablesConfig
{
get
{
return this.CurrentConnectionConfig is SystemTablesConfig;
}
}
#endregion
#region constructor
/// <summary>
/// If you have system table permissions, use this