c# - No table mappings provided -


i using entityframework.bulkinsert-ef6-ext hugocl. software running daily , getting "no table mappings provided." once in while, around 1 2 times week while rest of days runs fine.

below error stack trace:

at entityframework.bulkinsert.helpers.mappeddatareader`1..ctor(ienumerable`1 enumerable, iefbulkinsertprovider provider)    @ entityframework.bulkinsert.providers.efsqlbulkinsertproviderwithmappeddatareader.run[t](ienumerable`1 entities, sqltransaction transaction)    @ entityframework.bulkinsert.providers.providerbase`2.run[t](ienumerable`1 entities, idbtransaction transaction)    @ entityframework.bulkinsert.providers.providerbase`2.run[t](ienumerable`1 entities)    @ entityframework.bulkinsert.extensions.bulkinsertextension.bulkinsert[t](dbcontext context, ienumerable`1 entities, bulkinsertoptions options)    @ entityframework.bulkinsert.extensions.bulkinsertextension.bulkinsert[t](dbcontext context, ienumerable`1 entities, sqlbulkcopyoptions sqlbulkcopyoptions, nullable`1 batchsize)    @ entityframework.bulkinsert.extensions.bulkinsertextension.bulkinsert[t](dbcontext context, ienumerable`1 entities, nullable`1 batchsize)    @ adutility.logic.task.getdlassociatesbeforeruntask.<>c__displayclass1_0.<execute>b__0(tp_dls dl) in ... 

anyone can provide ideas on why happening?

below code using:

 var dlassociatesbeforerun = adhelper.getdlassociates(dl.dlname)                                 .select(x =>                                     new tp_dlassociatesbeforerun                                     {                                         dlid = dl.id,                                         adusername = x.adusername,                                         createdate = datetime.now,                                         createby = "adutility.cli",                                         updatedate = datetime.now,                                         updateby = "adutility.cli"                                     }).tolist();                             _logger.trace($"detected {dlassociatesbeforerun.count} dl {dl.dlname}");                             // resharper disable once invertif                             if (dlassociatesbeforerun.any())                             {                                 db.bulkinsert(dlassociatesbeforerun);                                 db.savechanges(); 

below getdlassociates method returns list of view model objects:

public list<dlassociateviewmodel> getdlassociates(string groupname, principalcontext context = null)     {         var dlassociate = new list<dlassociateviewmodel>();         var group = groupprincipal.findbyidentity(context ?? globalcontext, groupname);         if (group == null)         {             throw new exception("dl not found on active directory");         }         dlassociate.addrange(group.members.oftype<userprincipal>()             .select(member => new dlassociateviewmodel             {                  dlname = groupname,                 adusername = string.isnullorempty(member.employeeid) ? member.samaccountname : member.employeeid,             }));         return dlassociate;     } 


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -