Virtual Happy Hour this month, Jun 28, we'll be getting a sneak preview at our soon to launch SaaS CMS!

Try our conversational search powered by Generative AI!

Get all stores in DDS



I need to get a list of all types or names of the stores in the DDS. Im developing a tool to delete unused stores and it would be nice to be able to present them in a list. Anybody got any idée on how to do it?


Jan 24, 2020 11:21

You can do it by SQL

/****** Script for SelectTopNRows command from SSMS ******/

FROM [dbo].[tblBigTable]
group by StoreName

Jan 24, 2020 13:04

Hi Jesper,

I think you need to find all the class that inherited the "IDynamicData" and then you can loop through them to retrieve the stores

Jan 24, 2020 14:05

You can use StoreDefinition.GetAll() to get all the StoreDefinition, then use DynamicDataStoreFactory.Instance.GetStore(storeDefinition.StoreName)

Jan 27, 2020 9:14

@Jesper, is tool going to be public? Don't mind to join forces and add feature to this tool -

Jan 28, 2020 8:57


StoreDefinition.GetAll() did the trick, thx Quan.

This is my code for retrieving our data stores and removing selected store. Im filtering on our applications main namespece to remove all stores not created by us.

public List<DynamicDataStore> GetStores {

     var mainNamespace = Assembly.GetExecutingAssembly().GetName().Name;

     var ddsStores = new List<DynamicDataStore>();

     var storeDefinitions = StoreDefinition.GetAll().Where(x => x.StoreName.Contains(mainNamespace));

     foreach (var storeDefinition in storeDefinitions)

     return ddsStores;

public void DeleteStoreAndAllItems(string storeName)
     DynamicDataStoreFactory.Instance.DeleteStore(storeName, true);

Jan 29, 2020 9:48
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.