Interface IModelHandlerFactoryGeneric
- Namespace
 - Htmx.Components.Services
 
- Assembly
 - Htmx.Components.dll
 
Factory interface for creating strongly-typed model handlers. Inject this into your controllers rather than IModelRegistry in order to avoid DI recursion issues.
public interface IModelHandlerFactoryGeneric
  - Extension Methods
 
Methods
Get<T, TKey>(string, ModelUI)
Creates a strongly-typed model handler for the specified type identifier and UI configuration.
Task<ModelHandler<T, TKey>> Get<T, TKey>(string typeId, ModelUI modelUI) where T : class
  Parameters
typeIdstringThe unique identifier for the model type.
modelUIModelUIThe UI configuration for the model.
Returns
- Task<ModelHandler<T, TKey>>
 A task that represents the asynchronous operation. The task result contains the strongly-typed model handler.
Type Parameters
TThe entity type.
TKeyThe type of the entity's primary key.