Hi!
i´m using subsonic 3 trying convert a SQL2008 project to MySQL.
when the projects try execute this LINQ query :
public IQueryable<Marca> SelecionaMarcas()
{
try
{
return (from mc in _db.Marcas
where mc.Ativo == true
orderby mc.NomeMarca
select mc);
}
catch (Exception ex)
{
throw ex;
}
}
returns this error :
Object of type 'System.UInt64' cannot be converted to type 'System.Boolean'
in the SubSonic.Extensions Database.cs line 193:
if (val.GetType().IsAssignableFrom(valueType)){
currentProp.SetValue(item, val, null);
} else {
currentProp.SetValue(item, rdr.GetValue(i).ChangeTyp
that is the table of my Database:
CREATE TABLE `marca` (
`ID_Marca` int(4) NOT NULL AUTO_INCREMENT,
`NomeMarca` varchar(100) COLLATE utf8_unicode_ci NOT NULL DEFAULT '1',
`Ativo` bit(1) NOT NULL,
`LogoMarca` varchar(250) COLLATE utf8_unicode_ci DEFAULT NULL,
PRIMARY KEY (`ID_Marca`)
) ENGINE=InnoDB AUTO_INCREMENT=132 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
in Debug Mode i found the error is the Ativo Field.
Any body have any idea about this ?
Many Thanks!