Skip to content

Allow mapping columns by convention #219

Open
@chilversc

Description

@chilversc

When mapping an IUserType or an ICompositeUserType by convention there is no ability to specify defaults for the column names.

I would like to be able to do something like

public class DateTimeOffsetConvention : IPropertyConvention, IPropertyConventionAcceptance
{
    public void Accept (IAcceptanceCriteria<IPropertyInspector> criteria)
    {
        criteria.Expect (x => x.Type == typeof (DateTimeOffset));
    }

    public void Apply (IPropertyInstance instance)
    {
        instance.CustomType<DateTimeOffsetType> ();
        instance.Columns.Add ("Utc");
        instance.Columns.Add ("Offset");
    }
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions