mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
minor efficiency improvement if no values to seed
This commit is contained in:
parent
ee3347a0e2
commit
76ec6a7857
1 changed files with 1 additions and 1 deletions
|
|
@ -44,9 +44,9 @@ private static void InsertOnDuplicateKeyUpdate<TEntityType>(this DbContext dbCon
|
|||
{
|
||||
var entityType = dbContext.Model.FindEntityType(typeof(TEntityType));
|
||||
var properties = GetPropertiesLessValueGeneratedTimestamps(entityType);
|
||||
var columns = string.Join(", ", properties.Select(x => x.Name));
|
||||
var values = CreateValues<TEntityType>(properties, dataPath);
|
||||
if (values == "") return;
|
||||
var columns = string.Join(", ", properties.Select(x => x.Name));
|
||||
var updates = CreateUpdates(properties);
|
||||
var rawSqlString = "INSERT INTO " + entityType.Relational().TableName + " (" + columns + ") VALUES " +
|
||||
values + " ON DUPLICATE KEY UPDATE " + updates;
|
||||
|
|
|
|||
Loading…
Reference in a new issue