Skip to content

EntityBuilder.MapToColumn is not working  #1

@kaleshanagineni

Description

@kaleshanagineni

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions