Nullable object must have a value?

You can always switch to

 fill.travel.GetValueOrDefault()

To provide the default (false), or the value of the boolean column from the database. Or you can specify the default with an overload. Either way, the nullable currently doesnt have a value, which is why you get that exception.

Leave a Comment