---
title: "how to select and retrieve  data using  linq query in entity framework"  
description: "how to select and retrieve  data using  linq query in entity framework"  
author: "Anonymous User"  
published: 2016-01-21  
updated: 2016-01-21  
canonical: https://www.mindstick.com/forum/33908/how-to-select-and-retrieve-data-using-linq-query-in-entity-framework  
category: "asp.net mvc"  
tags: ["linq", "mvc", "entity framework"]  
reading_time: 1 minute  

---

# how to select and retrieve  data using  linq query in entity framework

I want to [select](https://www.mindstick.com/forum/160534/orderby-then-select-vs-select-then-orderby-performance) and [retrieve data](https://www.mindstick.com/forum/160347/how-do-you-retrieve-data-from-a-nosql-database-like-mongodb) using [linq query](https://www.mindstick.com/forum/33909/how-to-use-let-keyword-in-linq-query-mvc-entity-framework) in [entity framework](https://www.mindstick.com/articles/1566/crud-operations-using-entity-framework-code-first-approach) how to do this please help me.

## Replies

### Reply by Anonymous User

\

```
index.cshtml@model IList<ForumMVC.CUSTOMER>@{    ViewBag.Title = "WebGrid CRUD Operations";   }<table style="background-color: #ccc; width: 100%;">    <thead style="background-color: red;">        <tr>            <th>ID</th>             <th>Name</th>             <th>Phone</th>             <th>Email</th>             <th>Address</th>        </tr>    </thead>    <tbody style="background-color: #ddd;">        @foreach(var obj in Model)        {        <tr>            <th>@obj.CUST_ID</th>             <th>@obj.CUST_NAME</th>             <th>@obj.CUST_PHONE</th>             <th>@obj.CUST_EMAILID</th>             <th>@obj.CUST_ADDRESS</th>        </tr>        }    </tbody></table>Controller using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.Mvc;using ForumMVC;using System.Data.Entity;using ForumMVC.Models;namespace ForumMVC.Controllers{    public class HomeController : Controller    {        forumEntities1 db = new forumEntities1();        public ActionResult Index()        {            IList<CUSTOMER> data = db.CUSTOMER.Where(p => p.CUST_ID < 70 && p.CUST_ID > 50).ToList();            return View(data);        }    }}
```

![how to select and retrieve  data using  linq query in entity framework](https://www.mindstick.com/mindstickforums/b4c8f70d-f616-4fc7-9ba8-1ee5ce015975/images/62600061-2019-4c30-aa46-7c726754c95a.png)


---

Original Source: https://www.mindstick.com/forum/33908/how-to-select-and-retrieve-data-using-linq-query-in-entity-framework

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
