Error CS0266: Cannot implicitly convert type 'int?' to 'int'

I'm sure I'm missing something simple.

I'm looking to set a property based on a database value:

LocationID will be used to filter the grid. I'm getting "error CS0266: Cannot implicitly convert type 'int?' to 'int'"

The Location ID is of type int.

If I create a label with ${CurrentUser.FirstOrDefault()?.LocationID} as the value I do see the LocationID.

Any ideas?

Yep.. ${CurrentUser.FirstOrDefault().LocationID} removal of the ?

Look at the LocationID field in your database, are you allowing null values? Based on that either remove the "?" from your value statement, or change the property type to "int?"

They have to match.