---
title: "How to show first five records in Entity Framework"  
description: "How to show first five records in Entity Framework"  
author: "Sachin Singh"  
published: 2016-03-22  
updated: 2016-03-22  
canonical: https://www.mindstick.com/forum/34074/how-to-show-first-five-records-in-entity-framework  
category: "asp.net mvc"  
tags: ["c#", "asp.net", "asp.net mvc", "entity framework"]  
reading_time: 1 minute  

---

# How to show first five records in Entity Framework

Hi All,\
I want to display first five [records](https://www.mindstick.com/forum/34640/how-to-create-a-stored-procedure-for-display-all-records) using [entity](https://www.mindstick.com/forum/160562/database-connectivity-using-entity-framework-database-first-approach) [frameworks](https://www.mindstick.com/blog/11763/five-features-of-top-python-frameworks-for-web-developers-in-2018-that-make-everyone-love-it) using [ASP.NET MVC](https://www.mindstick.com/forum/155798/what-is-caching-in-asp-dot-net-mvc).**My [code](https://yourviews.mindstick.com/view/85458/alan-turing-the-mastermind-behind-cracking-the-enigma-code-during-world-war-ii) is below :**\
![How to show first five records in Entity Framework](https://www.mindstick.com/mindstickforums/38ad55c1-e777-4754-9c3b-2b5ab3ddfacd/images/12cad1f6-6953-4346-a2bc-ce7ab42b32ae.png)\
I want to find first 5 records. Please can anyone help.Thank you.

## Replies

### Reply by Anupam Mishra

Hi Sachin\
This is a very basic approach to finding:\

```
 var screens = db.AssignedScreen.Take(5).ToList();
```

we have also **IEnumerable** Interface we have also use like this:\

```
 var screens= db.AssignedScreen.ToList().Take(5);  
```

or, we have also sort our element\
\

```
 var screens =  db.AssignedScreen.OrderByDescending(c => c.arg**).Take(5).ToList();
```

** arg is a argument


---

Original Source: https://www.mindstick.com/forum/34074/how-to-show-first-five-records-in-entity-framework

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
