1

I'm working on a project with 20+ Modules with the following Technics:

WPF 4.0 , PRISM 4 , Unity 2.0 , MVVM Light , and Devexpress XPO as and ORM

I have no idea how to plane to use a XPO Session in my modules?

I have faced the following items but don't know witch is the best?

  1. Using a global static Session property
  2. Use a global static connection string
  3. Use a global static IDataLayer
  4. use and Registered Interface in PRISM
  5. or maybe you can give me a idea?
Ehsan Zargar Ershadi
  • 24,115
  • 17
  • 65
  • 95
  • 1
    I would definitively remove the static global options. Register your session factory as a singleton (if they have something like that in XPO) in your ioc container and reference the interface through ctors throughout the system. – Marius Jun 16 '11 at 09:00
  • When I say "througout the system" I mean of course in the correct layer within your module (probably hidden behind your repositories or something like that) – Marius Jun 16 '11 at 09:02
  • Tanks Marius, after having a lot of trouble with using static in such a way I do agree with your suggestion.Using interface through ctors is the 4th item I have mentioned in the question. but I'm hesitated with the correct way you mentioned in the second comment. – Ehsan Zargar Ershadi Jun 16 '11 at 09:44

0 Answers0