EntityBuilder.MapToColumn is not working as intended and throwing exception
System.ArgumentException: 'Expression 'x => Convert(x.Id, Object)' refers to a method, not a property.'
public class TestConfiguration : EntityConfiguration<Test>
{
protected override void Configure(EntityBuilder<Test> entityBuilder)
{
entityBuilder.MapToColumn(x => x.Id, "id");
}
}
this is easily reproducable , the problem here that EntityBuilder<TEntity>.MapToColumn(Expression<Func<TEntity, object>> customMapper, string columnName) should be changed to EntityBuilder<TEntity> MapToColumn(Expression<Func<TEntity, TProperty>> customMapper, string columnName) to infer the type from the usage.
EntityBuilder.MapToColumn is not working as intended and throwing exception
this is easily reproducable , the problem here that
EntityBuilder<TEntity>.MapToColumn(Expression<Func<TEntity, object>> customMapper, string columnName)should be changed toEntityBuilder<TEntity> MapToColumn(Expression<Func<TEntity, TProperty>> customMapper, string columnName)to infer the type from the usage.