AbleCommerce Forums
»
AbleCommerce
»
General Questions
»
9.0.2 Difference between repo loading and EntityLoader?
Rank: Advanced Member
Groups: HelpDesk, Developers Joined: 11/9/2018(UTC) Posts: 564
Thanks: 122 times Was thanked: 26 time(s) in 25 post(s)
|
There seem to be two ways to load a data class:
EntityLoader.Load<Basket>(model.BasketId)
and
_basketRepo.Load(model.BasketId)
What's the difference?
|
|
|
|
Rank: Advanced Member
Groups: Admin, Developers, Registered, HelpDesk, Authorized User Joined: 10/5/2018(UTC) Posts: 704
Thanks: 5 times Was thanked: 113 time(s) in 112 post(s)
|
Quote:EntityLoader.Load<Basket>(model.BasketId) Loading an object using EntityLoader is an easy way to load an object without initializing repo object from constructor. This approach is often used if there is a need to only load a data object but to call Save method and to access other repository functions you will need to use the _basketRepo.Load(model.BasketId)
|
|
|
|
Rank: Advanced Member
Groups: HelpDesk, Developers Joined: 11/9/2018(UTC) Posts: 564
Thanks: 122 times Was thanked: 26 time(s) in 25 post(s)
|
|
|
|
|
AbleCommerce Forums
»
AbleCommerce
»
General Questions
»
9.0.2 Difference between repo loading and EntityLoader?
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The AbleCommerce Forums uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close