Click here to Skip to main content
Click here to Skip to main content
Articles » Web Development » ASP.NET » Data » Downloads
 
Add your own
alternative version

Entity Framework - Second Level Caching with DbContext

, 6 Aug 2012 CPOL
How to enable 2nd level caching in the Entity Framework when using DbContext.
SecondLevelCachingExample.zip
SecondLevelCachingExample
packages
Castle.Core.3.1.0
lib
net40-client
Castle.Core.dll
Castle.Windsor.3.1.0
lib
net40
Castle.Windsor.dll
EFCaching
EFCachingProvider.dll
EFProviderWrapperToolkit.dll
EFTracingProvider.dll
EntityFramework.5.0.0-rc
Content
App.config.transform
Web.config.transform
EntityFramework.5.0.0-rc.nupkg
lib
net40
EntityFramework.dll
SecondLevelCaching.DataModel
bin
Debug
Models
Mapping
obj
Debug
DesignTimeResolveAssemblyReferencesInput.cache
TempPE
Properties
SecondLevelCachingExample
App_Data
bin
Content
themes
base
images
ui-bg_flat_0_aaaaaa_40x100.png
ui-bg_flat_75_ffffff_40x100.png
ui-bg_glass_55_fbf9ee_1x400.png
ui-bg_glass_65_ffffff_1x400.png
ui-bg_glass_75_dadada_1x400.png
ui-bg_glass_75_e6e6e6_1x400.png
ui-bg_glass_95_fef1ec_1x400.png
ui-bg_highlight-soft_75_cccccc_1x100.png
ui-icons_222222_256x240.png
ui-icons_2e83ff_256x240.png
ui-icons_454545_256x240.png
ui-icons_888888_256x240.png
ui-icons_cd0a0a_256x240.png
Controllers
Global.asax
Infratructure
Models
obj
Debug
DesignTimeResolveAssemblyReferencesInput.cache
TempPE
Properties
Views
Home
Shared
=== version 3.0
================================================================================================
change - Removed overloads of logging methods that were taking format string from ILogger and
	ILogger and IExtendedLogger and didn't have word Format in their name.
	For example:
	void Error(string format, params object[] args); // was removed
	void ErrorFormat(string format, params object[] args); //use this one instead


impact - low
fixability - medium
revision - 

description - To minimize confusion and duplication those methods were removed.

fix - Use methods that have explicit "Format" word in their name and same signature.
================================================================================================
change - Removed WebLogger and WebLoggerFactory

impact - low
fixability - medium
revision - 

description - To minimize management overhead the classes were removed so that only single 
	Client Profile version of Castle.Core can be distributed.

fix - You can use NLog or Log4Net web logger integration, or reuse implementation of existing
	web logger and use it as a custom logger.

================================================================================================
change - Removed obsolete overload of ProxyGenerator.CreateClassProxy

impact - low
fixability - trivial
revision - 

description - Deprecated overload of ProxyGenerator.CreateClassProxy was removed to keep the
	method consistent with other methods and to remove confusion

fix - whenever removed overload was used, use one of the other overloads.

================================================================================================
change - IProxyGenerationHook.NonVirtualMemberNotification method was renamed

impact - high
fixability - easy
revision - 

description - to accommodate class proxies with target method NonVirtualMemberNotification on
	IProxyGenerationHook type was renamed to more accurate NonProxyableMemberNotification
	since for class proxies with target not just methods but also fields and other member that
	break the abstraction will be passed to this method.

fix - whenever NonVirtualMemberNotification is used/implemented change the method name to
	NonProxyableMemberNotification. Implementors should also accommodate possibility that not
	only MethodInfos will be passed as method's second parameter.
	
================================================================================================
change - DynamicProxy will now allow to intercept members of System.Object

impact - very low
fixability - easy
revision - 

description - to allow scenarios like mocking of System.Object members, DynamicProxy will not
	disallow proxying of these methods anymore. AllMethodsHook (default IProxyGenerationHook)
	will still filter them out though.

fix - whenever custom IProxyGenerationHook is used, user should account for System.Object's
	members being now passed to ShouldInterceptMethod and NonVirtualMemberNotification methods
	and if neccessary update the code to handle them appropriately.

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Dylan Morley
Technical Lead
United Kingdom United Kingdom
No Biography provided

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.141223.1 | Last Updated 6 Aug 2012
Article Copyright 2012 by Dylan Morley
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid