Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public IList<Website> Get()
- {
- //The `_cacheManager.Get` just retrieves the object from an `ObjectCache` instance based on key.
- return _cacheManager.Get(CcCacheWebsiteAll, () => _websiteRepository.Table.ToList());
- }
- var store = new Store();
- store.Name = "something";
- store.Website = _websiteService.Get().FirstOrDefault();
- _storeService.Insert(store);
- //Where _storeService.Insert(store) is:
- public void InsertStore(Store store)
- {
- _storeRepository.Insert(store); //THIS will raise the error
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement