IMPORTANT: This version of Sitefinity CMS is out of support and the respective product documentation is no longer maintained and can be outdated. Use the version selector to view a supported product version.
After you Testimonials module: Create the fluent mappings of the module, you need to create the context class. To do so:
using
Telerik.OpenAccess;
Telerik.Sitefinity.Data.OA;
public
class
TestimonialsContext : SitefinityOAContext
{
}
TestimonialsContext(
string
connectionString, BackendConfiguration backendConfig, Telerik.OpenAccess.Metadata.MetadataContainer metadataContainer)
:
base
(connectionString, backendConfig, metadataContainer)
static
TestimonialsContext Get()
return
OpenAccessConnection.GetContext(
new
TestimonialsMetaDataProvider(),
"Sitefinity"
)
as
TestimonialsContext;
IQueryable<Testimonial> Testimonials
get
GetAll<Testimonial>(); }
You inherit from SitefinityOAContext method and reuse its functionality. You create the Get method to get an instance to the context. Finally, you get all testimonials by calling the GetAll method.
Back To Top
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important