I am using Angular2 as a client and for server side its ASP.NET WebAPI + EF6. My DbContext is being shared for multiple DB operation within the same WebApi request. To share DbContext among multiple DB Operations, i am keeping DbContext in HttpContext.Current.Items["SameKey"].
So will it be unqiue on each WebApi call?
It's guaranteed to be unique. The HttpContext.Current.Items
is only valid for a single request and when the request is sent back to a browser, its data will be flushed out automatically.
Please visit the following link for more information:
Hope this will help you