We are starting to do a conversion to BL Toolkit but are hitting some issues and not finding answers. One such issue is the inability to get the MapValue attribute on our DTO's properly to map.
Using T4 templates, we generate this (as an example):
[MapField("counterparty_fl")]
[MapValue(true, 'y')]
[MapValue(false, 'n')]
public bool CounterpartyFlag { get; set; } // flag_yn_TY(1)
Our database is Sybase, and the field counterparty_fl is a char(1) that accepts either 'y' or 'n'.
However, when I look at the SQL generated by the following link query, it is writing [counterparty_fl] = 0. What I need is [counterparty_fl] = 'n'
var results = (from i in facade.InputList
where (
i.UserIdentifier == criteria.UserId &&
i.CounterpartyFlag == false &&
i.Name == criteria.Name)
select i);
Has anyone had better luck with MapValue? Any suggestions?