This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
In the screencast regarding eager loading you use a Repository.Current to access the entities and the data, can you please tell me the advantages and disadvantages of using this approach rather than the approach you adopt in the other screencasts of creating a uow in every procedure / function? Obviously there is less code this way, but are there any other issues or drawbacks I should consider? Thanks |
|
|
Hi Mark, Thanks for your post. The eager loading screencast is the oldest screencast on the site and should be updated. The Repository.Current approach was helpful mostly to folks who were moving from LightSpeed 1.x which had a singleton Repository object. What I did in the screencast was write a basic wrapper to simulate it. The advantages of the other approach that is used in the other screencasts is that you know in more detail what is going on with your UoW because it's so in your face. This may not be a good thing, but it's great when you first start using LightSpeed. What we normally would do however is pick a strategy depending on application type. This is by no means the best way of doing things, but gives you an idea:
I hope that helps give you an idea of how you could use the unit of work more nicely. Kind regards, John-Daniel Trask |
|