what best proceed .savechanges() slight ado.net information services?


does anyone have good information use .savechanges() method?



i am experiencing accumulation issues attempting .savechanges() slight information context object. i am holding information an existent information source, formulating suitable entityframework/dataservice objects, populating those combined objects data, adding those objects context following saving information job .savechanges.



the scenarios i've adult (and problems compared them) such ... any unfolding i have foreach loop holding information rows datatable generating objects, attaching context go. (note: 3 objects "member" twin "addresses" trustworthy around setlink call) - fundamentally reworking apparatus take information data store massage information store unprotected information services.




  • call .savechanges() but any parameters once during finish foreach loop (i.e. outmost loop)


    • outofmemory blunder 1/3 proceed (30,000 out 90,000 saves) - certain duty nonetheless any save vigilant seperate sql database, there run out memory on?


  • call .savechanges() but any parameters once per loop


    • this works, nonetheless takes absolutly evermore (8 hours 90,000 saves)


  • call .savechanges(savechangesoption.batch) once during finish foreach loop


    • same outofmemory error, nonetheless but any saves database


  • call .savechanges(savechangesoption.batch) once per loop


    • 404 found error


  • call .savechanges(savechangesoption.batch) once per 10 loops


    • 400 bad ask blunder (occassionally)

    • outofmemory after array itterations


  • a array futile attempts emanate context once per loop, have non-static during start loop have private member non-static available.


    • differing results, amateurish quantify, zero unequivocally good




what prefered slight job .savechanges() fan vigilant doing infinite information bucket this? there something i'm removing .savechanges() works? anyone yield some-more sum once should utilizing duty (if any) prerequisites saving information around information services? there any best practices around .savechanges() slight call? there any quite good support .savechanges() slight call?



Comments

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

why does floated <input> control floated component slip over too distant right ie7, nonetheless firefox?