Minimal changes needed for new non-static DP and AppContext for CSLA 6 #2670
-
Let me see if I understand the implications of the answer for #2632 ... and to ask about what I think might be the most minimal changes to my business objects (and others like me) to get up to v6. In that ticket, @rockfordlhotka said:
He further explained that the whole thing stems from no longer being able to get a static reference to ApplicationContext which is required to get a DataPortal. Question One - So is it correct that if I
So this is what I had previously:
that could now become this:
Notice the "??". I'm not sure what is that 2nd parameter on the DataPortal constructor: Csla.DataPortalClient.IDataPortalProxy Finally, I do realize that if I can DI up an instance of ApplicationContext, then I could simply also get a proper DataPortal object...but for some reason that seems to make less sense to me. Maybe just my old twisted brain that will finally click eventually. Thank you 1000 times for all your hard work on v6 Rocky. I just gotta get my mind wrapped around this big change. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
I have some example code in my blog post about the CSLA 6 prerelease. Also, there is some discussion in that post's discussion area that includes (for WinForms/WPF apps) a way to expose a |
Beta Was this translation helpful? Give feedback.
I have some example code in my blog post about the CSLA 6 prerelease.
Also, there is some discussion in that post's discussion area that includes (for WinForms/WPF apps) a way to expose a
GetDataPortal
method from theApp
object.