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 AbleCommerce Gold forum. Please use your AbleCommerce username and password to Login. New Registrations are disabled.

Notification

Icon
Error

Options
Go to last post Go to first unread
Joe Payne2  
#1 Posted : Friday, March 12, 2021 10:57:33 AM(UTC)
Joe Payne2

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)
I thought the whole design of AC9 was built around repositories doing all the save/load work?

In the admin StoreController, I came across this:

Code:

            store.Settings.Save();
            _storeRepo.Save(store);


Shouldn't settings be saved using an IStoreSettingsRepository object?

Or a different question, wouldn't saving the Store object cascade down and automatically save the child collection of settings since the collection would be dirty?

Or is this just a leftover that got missed during code conversion to MVC?

Wanna join the discussion?! Login to your AbleCommerce Forums forum account. New Registrations are disabled.

mazhar  
#2 Posted : Thursday, March 18, 2021 2:03:39 PM(UTC)
mazhar

Rank: Administration

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

Thanks: 8 times
Was thanked: 17 time(s) in 15 post(s)
The repositories were added for domain objects which had corresponding database tables. The settings property in store is a manager class wrapper written around store object to provide easy and efficient access on settings. The method remained the same since it was not a business object corresponding to table mapped hibernate entity.
thanks 1 user thanked mazhar for this useful post.
Joe Payne2 on 3/18/2021(UTC)
Joe Payne2  
#3 Posted : Thursday, March 18, 2021 2:34:00 PM(UTC)
Joe Payne2

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)
I get it. That makes sense now, thank you.
Users browsing this topic
Guest
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.