Advertisement
Guest User

Untitled

a guest
May 30th, 2012
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Web;
  5.  
  6. namespace Projet___TestConnaissances
  7. {
  8. public class Database : IDatabase
  9. {
  10. public DataSourceContainer _Context
  11. {
  12. get
  13. {
  14. string ocKey = "ocm_" + HttpContext.Current.GetHashCode().ToString("x");
  15. if (!HttpContext.Current.Items.Contains(ocKey))
  16. HttpContext.Current.Items.Add(ocKey, new DataSourceContainer());
  17. return HttpContext.Current.Items[ocKey] as DataSourceContainer;
  18. }
  19. }
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement