This project is read-only.

Error while using part repository

Topics: General, Troubleshooting, Writing modules
Aug 26, 2011 at 8:24 AM

I'm getting the following error when i try to use a part repository like  _communityMyMessagePartRecordRepository.Table

{"Could not find entity named: CommunityUserProfile.Parts.CommunityMyMessagePart"}

Aug 26, 2011 at 7:23 PM

When you try to use it how?

Aug 28, 2011 at 9:45 PM
Edited Aug 28, 2011 at 9:47 PM

Looks like you are trying to use IRepository<MyPart> instead of IRepository<MyPartRecord>. Repositories are only available to records - you cannot query for specific part using IRepository<T>, as parts are not entites stored in db. Parts are simply wrappers around some record. If you want to query for specific parts, use IContentManager.Query<TPart, TRecord>(...).

- Piotr