Is there a way to convert to boolean value so it will work?
Please advise
Is there a way to convert to boolean value so it will work?
Please advise
Yes, you should add a new property to your model which converts to and from integer. Add a partial class for the model and something like this:
public partial class MyModel
{
public bool BoolProperty
{
get
{
return this.IntegerProperty != 0;
}
set
{
this.IntegerProperty = value ? 1 : 0;
}
}
}
Thank you! That worked.
Milt