Question: my project is in **vbnet**. 
i have a **stored procedure**, and get the results with **linq**. i know how to get it with sql adapter, which is easy in sorting and filtering, but i have to do it with linq.

my code is like that.

```
dgv.DataSource = db.Egitek_Gorev_Listesi(LoggedUserID)

```

data is shown in datagridview, but i can not filter,**search** or **order** in it.

does anybody know a better way todo it.

Answer: 
The corresponding entity for `dbo.AspNetUserLogins` table is `IdentityUserLogin` class. So we just need to declare an appropriate `IDbSet<IdentityUserLogin>` or `DbSet<IdentityUserLogin>` property in the `ApplicationDbContext` class as follows:

```
public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
{
    // ...
    public IDbSet<IdentityUserLogin> UserLogins { get; set; }
    // ...
}

```

and then query it as usually:

```
using (var dbContext = new ApplicationDbContext())
{
    var userLogins = dbContext.UserLogins.ToList();
}

```
I know this is old but for anyone looking to do this with asp .Net Core:

Add user manager to your controller constructor that you can access below by DI.

```
var user = await _userManager.GetUserAsync(User);
var hello = await _userManager.GetLoginsAsync(user);

```