Link Search Menu Expand Document


A cacher class for the class primary property. Underneath, it uses the PrimaryMapper class to extract the results and caching it for future use.

Internally, this class is widely used within the library.


Below are the methods available from this class.

FlushAllows you to flush the caches.
GetReturns the list of Field objects.


You can simply call the Get() method of this class by passing the class type.

var primary = PrimaryCache.Get(typeof(Person));
// Use the 'primary' here

Or, via generic type.

var primary = PrimaryCache.Get<Person>();
// Use the 'primary' here

Internally, it uses the PrimaryMapper and PropertyCache classes to extract the list of ClassProperty and filter the result using the given IsPrimary() method.