I have a class similar like this:
public class WorkEntity
{
... // other stuff here
public virtual int? WorkTypeID { get; set; }
}
in my joined queryover I need to filter my results by WorkTypeID
query.Where(() => workEntity.WorkTypeID == filter.WorkTypeID.Value);
it doesn't work, because the type is nullable, how can I make it work?