November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
Hi Johan,
How do you set the Id property of your ContactData objects? If the objects have the same identity, the second one will overwrite the first one when saving to the DDS.
In this example the two ContactData objects have the same identity, so totalCount will be equal to 1:
Identity identity = Identity.NewIdentity(Guid.NewGuid());
ContactData contactData1 = new ContactData
{
Id = identity
// Other properties set
};
ContactData contactData2 = new ContactData
{
Id = identity
// Other properties set
};
ContactDataManager.SaveContactData(contactData1);
ContactDataManager.SaveContactData(contactData2);
int totalCount = ContactDataManager.GetAllContactData().Count;
In this example the two ContactData objects have the different identities, so totalCount will be equal to 2:
Identity identity1 = Identity.NewIdentity(Guid.NewGuid());
Identity identity2 = Identity.NewIdentity(Guid.NewGuid());
ContactData contactData1 = new ContactData
{
Id = identity1
// Other properties set
};
ContactData contactData2 = new ContactData
{
Id = identity2
// Other properties set
};
ContactDataManager.SaveContactData(contactData1);
ContactDataManager.SaveContactData(contactData2);
int totalCount = ContactDataManager.GetAllContactData().Count;
Hopefully, this will help you out :)
Karoline
I´m struggeling with the DynamicDataStore (CMS 6 R2 .NET 4.0) and can´t get it to work properly.
It saves my data alright, but when I save a new post it seems to over write the first one. When I try to open the store it always contains just one post.
Anyone?
This is the class that holds the data:
// This is the functions for saving and retreiving data