I am a beginner to LINQ and I have a query where I need result like this.
Id | RoleName
-------------------
1 | Member
2 | Admin
3 | Manager
4 | Accountant
Id | UserId| RoleId | ExpirationDate
-------------------------------------
1 | 1 | 1 | 1/1/2011
2 | 1 | 4 | 1/1/2012
3 | 2 | 2 | 1/1/2013
4 | 3 | 3 | 1/1/2014
I want result like below for any user.Say for user id 1 it should be as below.
RoleName | IsInRole | ExpirationDate
-----------------------------------
Member | True | 1/1/2011
Admin | False |
Manager | False |
Accountant | True | 1/1/2014