Skip to content

Request: Allow custom implementation without attribute #399

@sellig

Description

@sellig

so it is what allows us to keep the POCOs attribute free.
as in As FluentMap à la https://dapper-tutorial.net/dapper-fluentmap
or https://github.com/tmsmith/Dapper-Extensions/wiki/AutoClassMapper

Brainstorm implementation

TypeMapper.RegisterMap(new CustomerMap());
 
public class CustomerMap :  EntityMap<Customer>
{
    public CustomerMap()
    {
        Map("[dbo].[Customer]");
        
	Map(p => p.Id).IsKey();

	Map(p => p.Id).IsIdentity();

        Map(p => p.Id)
            .ToColumn("CustomerId");

        Map(p => p.ExtraInfo)
            .UsePropertyHandler<CustomerExtraInfoHandler>();

       Map(p => p.Image)
            .UseMicrosoftSqlServerDbType(SqlDbType.Binary);
    }
}

Metadata

Metadata

Assignees

Labels

deployedFeature or bug is deployed at the current releaseenhancementNew feature or requestfeatureDefined as a big development item (feature)priorityTop priority feature or things to dorequestA request from the community.todoThings to be done in the future

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions