---
title: "How to index view record information only current user"  
description: "How to index view record information only current user"  
author: "Anupam Mishra"  
published: 2016-03-18  
updated: 2016-03-18  
canonical: https://www.mindstick.com/forum/34063/how-to-index-view-record-information-only-current-user  
category: "asp.net"  
tags: ["c#", "asp.net", "asp.net mvc", "mvc", "view"]  
reading_time: 1 minute  

---

# How to index view record information only current user

Hi,\
i have [already](https://yourviews.mindstick.com/view/88453/the-hidden-ways-ai-is-already-controlling-your-daily-life) [code](https://yourviews.mindstick.com/view/85458/alan-turing-the-mastermind-behind-cracking-the-enigma-code-during-world-war-ii) in [index](https://www.mindstick.com/blog/198/index-in-sql-server) [view](https://yourviews.mindstick.com/view/84701/layoffs-in-google-india-2023-view) recorded only information about [current user](https://www.mindstick.com/forum/34471/get-current-user-id-in-mvc) . My code is below:\

```
 var req = db.permit.Include(e => e.User).Where(m => m.UserId == User.Identity.GetUserId());           return View(req);
```

But it's not work. can [anyone give me](https://answers.mindstick.com/qa/41194/can-anyone-give-me-some-high-and-low-points-of-each-of-the-four-first-presidential-administrations) a solution.\
Thank you.

## Replies

### Reply by Sachin Singh

Hi Anupam,\
If you are use this code, i think your problem probably be solved:\

```
string userID = User.Identity.GetUserId();var req = db.permit.Include(e => e.User).Where(m => m.UserId == userID);return View(req);
```


---

Original Source: https://www.mindstick.com/forum/34063/how-to-index-view-record-information-only-current-user

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
