HomeGuidesAPI ReferenceChangelogDiscussions
GuidesiMIS ProfessionaliMIS EnterpriseClient SupportLog In
Discussions
These docs are for v20.3.44. Click to read the latest docs for v20.3.192.

Discussions

Ask a Question
Back to All

EntityManager Find vs FindByIdentity performance

Hello all,

In order to retrieve PartyCommercePreferences for user we are using following code:

PartyCommercePreferencesData partyCommPreferences = EntityManager.FindByIdentity(new IdentityData(typeof(PartyCommercePreferencesData), UserID)) as PartyCommercePreferencesData;

Sample code from iMIS SDK uses following code:
var findResultsData = entityManager.Find(new QueryData(PartyCommercePreferencesData.EntityTypeName).AddCriteria(new CriteriaData("PartyId", OperationData.Equal, UserID))).Result;
PartyCommercePreferencesData partyCommPreferences = findResultsData[0] as PartyCommercePreferencesData;

Is there some performance penalty by using FindByIdentity and/what would be other advantages (or disadvantages) using EntityManager.Find

Thanks,
Igor

Contact us
Copyright © Advanced Solutions International, All rights reserved.