Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2014
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. public IList<Website> Get()
  2. {
  3. //The `_cacheManager.Get` just retrieves the object from an `ObjectCache` instance based on key.
  4. return _cacheManager.Get(CcCacheWebsiteAll, () => _websiteRepository.Table.ToList());
  5. }
  6.  
  7. var store = new Store();
  8. store.Name = "something";
  9. store.Website = _websiteService.Get().FirstOrDefault();
  10. _storeService.Insert(store);
  11.  
  12. //Where _storeService.Insert(store) is:
  13.  
  14. public void InsertStore(Store store)
  15. {
  16. _storeRepository.Insert(store); //THIS will raise the error
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement