Skip to content
Discussion options

You must be logged in to vote

Static factory methods are no longer an option.

Your choices are to inject (or create) a DataPortal<T> instance and use it, or put your static factory methods into a factory class (so they become instance methods of that class) and inject the DataPortal<T> into that class.

For the most part, you'll find that your UI elements (page/form/etc.) are created via DI, and so you can just inject the DataPortal<T> you need into the page/form and use it to interact with your domain objects.

Replies: 1 comment 9 replies

Comment options

You must be logged in to vote
9 replies
@rockfordlhotka
Comment options

@Brannos1970
Comment options

@rockfordlhotka
Comment options

@rockfordlhotka
Comment options

@Brannos1970
Comment options

Answer selected by Brannos1970
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants