To a large extent, you need to maintain the same data context throughout the life cycle of the operations you want to perform if you are ever going to store changes that should be .SubmitChanges()later, since otherwise you will lose these changes.
If you just request the material, then it’s fine to create them as needed, but if you want .SubmitChanges(), if you later want to, you will have to reorganize your code many times so that you can also accept the template effectively saving datacontextglobally throughout the application from the very beginning.
, . , ( , "" , , ), . .SubmitChanges() , . , datacontext , ( StateChange , , ).
, , , .