Interface IExcelConfiguration<TEntity>
- Namespace
- WeihanLi.Npoi.Configurations
- Assembly
- WeihanLi.Npoi.dll
Strongly typed configuration contract for a specific entity.
public interface IExcelConfiguration<TEntity> : IExcelConfiguration
Type Parameters
TEntityEntity type.
- Inherited Members
- Extension Methods
Methods
Property<TProperty>(Expression<Func<TEntity, TProperty>>)
property configuration
IPropertyConfiguration<TEntity, TProperty> Property<TProperty>(Expression<Func<TEntity, TProperty>> propertyExpression)
Parameters
propertyExpressionExpression<Func<TEntity, TProperty>>propertyExpression to get property info
Returns
- IPropertyConfiguration<TEntity, TProperty>
current property configuration
Type Parameters
TPropertyPropertyType
Property<TProperty>(string)
property configuration
IPropertyConfiguration<TEntity, TProperty> Property<TProperty>(string propertyName)
Parameters
propertyNamestringpropertyName
Returns
- IPropertyConfiguration<TEntity, TProperty>
current property configuration
Type Parameters
TPropertyPropertyType
WithDataFilter(Func<TEntity?, bool>?)
register data filter
IExcelConfiguration<TEntity> WithDataFilter(Func<TEntity?, bool>? dataFilter)
Parameters
Returns
- IExcelConfiguration<TEntity>
current excel configuration
WithPostImportAction(Action<TEntity?, int>?)
register post action for T and rowIndex based func
IExcelConfiguration<TEntity> WithPostImportAction(Action<TEntity?, int>? postAction)
Parameters
Returns
- IExcelConfiguration<TEntity>
WithPropertyComparer(IComparer<PropertyInfo>?)
register property comparer
IExcelConfiguration<TEntity> WithPropertyComparer(IComparer<PropertyInfo>? propertyComparer)
Parameters
propertyComparerIComparer<PropertyInfo>propertyComparer
Returns
- IExcelConfiguration<TEntity>
current excel configuration
WithValidator(IValidator?)
register validator for excel import
IExcelConfiguration<TEntity> WithValidator(IValidator? validator)
Parameters
validatorIValidatorvalidator
Returns
- IExcelConfiguration<TEntity>
current excel configuration