i suspect your relationship is not 1 to 1.


since you did an .include("users") you should be able to just traverse the user property in the message object to get the information your want.


you forgot to include the declaration of your "message" class but i suspect that the userid property in that class is not declared as a nullable type. if that is the case, change it from "int" to "int?" (nullable int).

Related Query