Watching few examples that use repository pattern like StoreFront I couldn’t figure out where is context.Dispose() called? Wouldn’t not disposing of data context lead to memory leaks? or is it just one Data context for each respoitory for the lifetime of application?
Watching few examples that use repository pattern like StoreFront I couldn’t figure out where
Share
If you are using a
usingstatement, which you should be doing, the call is automatically disposed as it implements theIDisposableinterface.Such as:
http://msdn.microsoft.com/en-us/library/yh598w02.aspx