I've added properties to my Linq classes as such:
I've named my Linq entity property dbStatus and set it to Protected Access because I want my clients to use this Status property and the associated Enums. Works beautifully.Code:Public Property Status() As UCRStatus Get Return Me.dbStatus End Get Set(ByVal value As UCRStatus) Me.dbStatus = value End Set End Property End Class Public Enum UCRStatus [Closed] = 0 [BranchManager] = 1 [Client] = 2 End Enum
Until I want to query on the Status. Then I, understandably, get the error that says there's no mapping to SQL.
Without opening up my raw database field for manipulation, is there a way I can teach Linq to deal with or map this property in a way that "where x.Status = UCRStatus.BranchManager" ? Or maybe there's a better way to go about this overall?
Thanks in advance for the insight.







Bookmarks