forked from smartstore/SmartStoreNET
-
Notifications
You must be signed in to change notification settings - Fork 0
DEV Shortcuts
Michael Herzog edited this page Aug 25, 2014
·
1 revision
Contains frequently used common services in form of properties. Instead of defining multiple common services in the constructor of a dependant type you just define one single dependency: {{ICommonServices}}, which provides the following properties:
- Cache
- DbContext
- StoreContext
- WebHelper
- WorkContext
- EventPublisher
- Localization
- Notifier
- Permissions
- CustomerActivity
All services are internally wrapped in {{ Lazy }}, so none of the services get instantiated until first hit.
If there is a property named {{T}} of the type {{Localizer}} within a depenency class, it'll be injected automatically by Autofac. So, instead of writing {{_localizationService.GetResource("xyz")}} you just type {{T("xyz")}}.
If there is a property of type {{ILogger}} (with whatever name) within a depenency class, it'll also be injected automatically by Autofac.
- The SmartStore.Net Web API in detail
- HMAC authentication
- Code examples
- Working with the product entity
- More examples
- Why do I get "We're sorry, an internal error has occurred"
- How to add code to the head section of my page
- How to format an Excel import file?
- How to add my own links to shop menus?