OrchardCore icon indicating copy to clipboard operation
OrchardCore copied to clipboard

Add events before and after handling bulk imports

Open hyzx86 opened this issue 2 years ago • 10 comments

Scene:

  1. Process the data before bulk import
  2. Batch update dynamic SQL indexes after batch import

I am using FreeSql as an ORM tool that supports dictionary type data insertion/update (including batch mode) http://www.freesql.net/en/guide/insert-or-update.html#_2-ifreesql-insertorupdatedict

var dic = new Dictionary<string, object>();
dic.Add("id", 1);
dic.Add("name", "xxxx");

fsql.InsertOrUpdateDict(dic).AsTable("table1").WherePrimary("id").ExecuteAffrows();

related: https://github.com/OrchardCMS/OrchardCore/issues/8869

hyzx86 avatar Apr 13 '22 14:04 hyzx86