I am new to patterns, so give me a hand here please. :D
I am writing repository classes, and some of my GetSomething() methods will undoubtedly take a long time to complete. We will need to run them in a background thread so that the UI does not get jammed.
Should I implement the event based asynchronous pattern in the repository classes themselves, or should I write something in the 'application layer' to handle all these slow methods in a BackgroundWorke r. What would be a better practice?
Thanks in advance!
I am writing repository classes, and some of my GetSomething() methods will undoubtedly take a long time to complete. We will need to run them in a background thread so that the UI does not get jammed.
Should I implement the event based asynchronous pattern in the repository classes themselves, or should I write something in the 'application layer' to handle all these slow methods in a BackgroundWorke r. What would be a better practice?
Thanks in advance!