logo
Welcome to our new AbleCommerce forums. As a guest, you may view the information here. To post to this forum, you must have a registered account with us, either as a new user evaluating AbleCommerce or an existing user of the application. For all questions related to the older version of Gold and earlier, please go to forums.ablecommerce.com. Please use your AbleCommerce username and password to Login. Forums Registration.

Notification

Icon
Error

Options
Go to last post Go to first unread
Joe Payne @ AbleMods LLC  
#1 Posted : Wednesday, October 7, 2020 2:47:59 PM(UTC)
Joe Payne @ AbleMods LLC

Rank: Advanced Member

Groups: HelpDesk
Joined: 11/9/2018(UTC)
Posts: 146

Thanks: 32 times
Was thanked: 5 time(s) in 5 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?

Wanna join the discussion?! Login to your AbleCommerce Forums forum account. Forums Registration.

shari  
#2 Posted : Wednesday, October 14, 2020 12:09:18 PM(UTC)
shaharyartiwana25816656

Rank: Advanced Member

Groups: Admin, Developers, Registered, HelpDesk, Authorized User
Joined: 10/5/2018(UTC)
Posts: 185

Was thanked: 24 time(s) in 24 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)
Joe Payne @ AbleMods LLC  
#3 Posted : Wednesday, October 14, 2020 2:03:21 PM(UTC)
Joe Payne @ AbleMods LLC

Rank: Advanced Member

Groups: HelpDesk
Joined: 11/9/2018(UTC)
Posts: 146

Thanks: 32 times
Was thanked: 5 time(s) in 5 post(s)
Good to know, thank you.
Users browsing this topic
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.