Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Entity Framework 101
Message
From
04/06/2014 10:07:37
 
 
To
04/06/2014 09:09:08
General information
Forum:
ASP.NET
Category:
Entity Framework
Environment versions
Environment:
C# 4.0
OS:
Windows 8
Network:
Windows 2000 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01601183
Message ID:
01601262
Views:
36
You don't need stored proc for this.

Something like
var customers = context.Customers.OrderBy(c => c.CompanyName);
var customers = context.Customers.Where(c => c.State == "NY" && c.City == "New York");

or mix them

var customers = context.Customers.Where(c => c.State == "NY" && c.City == "New York").OrderBy(c => c.CompanyName);
>
>1. I need to display a list of possible selections in a dropdown list, so I want to select all the selections from my table and sort them alphabetically.
>
>2. I need to pull out a subset of data based on a couple parameters.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform