MicroLite icon indicating copy to clipboard operation
MicroLite copied to clipboard

TypeConverters are not invoked for dynamic projections

Open TrevorPilley opened this issue 10 years ago • 0 comments

When a projection is used, the type converters are not invoked so if you have the following:

public enum CustomerStatus { ... }

public class Customer
{
    public string Name { get; set; }
    public CustomerStatus Status { get; set; }
}

And do the following:

var customers = session.FetchAsync<dynamic>(new SqlQuery("SELECT Name, Status FROM Customer"));

customers[0].Status would be an int, not a CustomerStatus

TrevorPilley avatar Oct 07 '15 13:10 TrevorPilley