Class SimpleContentTypeMapper
Provides mapping logic between the SimpleContentType entity and its corresponding database schema representation.
Namespace: Umbraco.Cms.Infrastructure.Persistence.Mappers
Assembly: Umbraco.Infrastructure.dll
Syntax
[MapperFor(typeof(ISimpleContentType))]
[MapperFor(typeof(SimpleContentType))]
public sealed class SimpleContentTypeMapper : BaseMapper
Remarks
TODO: This mapper is actually very useless because the only time it would ever be used is when trying to generate a strongly typed query on an IContentBase object which is what exposes ISimpleContentType, however the queries that we execute in the content repositories don't actually join on the content type table. The content type data is resolved outside of the query so the end result of the query that is generated by using this mapper will either fail or the syntax will target umbracoNode which will be filtering on the actual content NOT the content type. I'm leaving this here purely because the ExpressionTests rely on this which is fine for testing that the expressions work, but note that this resulting query will not.
Constructors
View SourceSimpleContentTypeMapper(Lazy<ISqlContext>, MapperConfigurationStore)
Initializes a new instance of the SimpleContentTypeMapper class.
Declaration
public SimpleContentTypeMapper(Lazy<ISqlContext> sqlContext, MapperConfigurationStore maps)
Parameters
| Type | Name | Description |
|---|---|---|
| Lazy<ISqlContext> | sqlContext | The lazy-loaded ISqlContext used for database operations. |
| MapperConfigurationStore | maps | The MapperConfigurationStore containing mapping configurations. |
Methods
View SourceDefineMaps()
Declaration
protected override void DefineMaps()