Table of Contents

Namespace Custom.Hybrid

Recommended Base Classes for all your Razor and C# files which work on Dnn ☢️ & Oqtane 🩸.

This contains all the hybrid base classes for your own solutions. They are meant to work across platforms (Dnn ☢️, Oqtane 🩸, NopCommerce 🔵 etc.)

Versioned Base Classes

All the base classes in this have a version number, so it will become easier to document differences between versions and also to give guidance how to upgrade in case of future breaking changes or security issues.

Classes

Api12

The base class for hybrid APIs. They internally inherit either from from DnnApiController or from Microsoft.AspNetCore.Mvc.Controller and in addition to all the DynamicCode properties also have all the features of that base class - but you should be careful using base-class properties, as they will probably not be hybrid any more.

Code12

The base class for custom hybrid code. If you inherit from this class, you'll automatically have all the properties from DynamicCode.

Razor12

The base class for custom Razor. If you inherit from this class, you'll automatically have all the properties from DynamicCode.

Classes

Api12

This is the base class for all custom API Controllers.
With this, your code receives the full context incl. the current App, DNN, Data, etc.

Api14

Base class for v14 Dynamic WebAPI files. Will provide the ServiceKit14 on property Kit. This contains all the popular services used in v14, so that your code can be lighter.

ApiTyped

Base class for v16 Typed WebAPI files. Use it to create custom WebAPI endpoints in your App.

It provides the ServiceKit16 on property Kit which contains all the popular services to create amazing stuff.

Code12

This is the base class for custom code (.cs) files in your Apps. By inheriting from this base class, you will automatically have the context like the App object etc. available.

Tip

This is an old base class and works, but you should use a newer one such as CodeTyped

Code14

Base class for v14 Dynamic Code files.

Will provide the ServiceKit14 on property Kit. This contains all the popular services used in v14, so that your code can be lighter.

CodeTyped

Base class for v16 Typed CSharp files. Use it to create custom CS code in your App.

It provides the ServiceKit16 on property Kit which contains all the popular services to create amazing stuff.

Razor12

The base class for Hybrid Razor-Components in 2sxc 12
Provides context objects like CmsContext, helpers like Edit and much more.

Razor14

Base class for v14 Dynamic Razor files. Will provide the ServiceKit14 on property Kit. This contains all the popular services used in v14, so that your code can be lighter.

RazorTyped

Base class for v16 Typed Razor files. Use it to create custom CS code in your App.

It provides the ServiceKit16 on property Kit which contains all the popular services to create amazing stuff.

RazorTyped<TModel>

New base class with custom model. The rest of this is identical to RazorTyped.