ObjectContext in ASP.Net

I am working with a project in ASP.Net using Webforms. I am using Entity Framework to save data in Microsoft SQL.

My question is:

Can I use the Static class to save ObjectContext EF in real time and put / get entities NOT stored inside ObjectContext?

I want to create an object and then add with AddObject to the ObjectContext, but DO NOT do Savechanges. All this in one web form. And then in another web form, access the ObjectContext and get the object when you add it.

Is it possible?

+3
source share
3 answers

My terms of use ObjectContext:

  • Do not use a static context.
  • Do not share the context.

. , . ObjectContext . , .

. , , - .

- , ObjectContext .

+2

, . ObjectContext , . ASP.NET .

, , . Cache , , , .

0

Source: https://habr.com/ru/post/1796100/


All Articles