TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Ashwanikumar singh
NA
39
48.4k
ASP.NET LINQ TO SQL, get the 2nd highest salary
Jun 27 2016 11:09 AM
I am making a small demo project where i wish to retrieve 2nd highest salary on label,using linq to sql
Here is my code :
public void Get2ndHighestSalalry()
{
using (DemoDbEntitiesss db = new DemoDbEntitiesss())
{
var query =db.Employees
.OrderByDescending(e => e.Salary)
.Skip(1)
.First();
lbl2ndhighestSalalry.Text = query.ToString();
}
}
But it returning me below code on my label :
My Output is :
second Highest Salary is :
asp.netPracticeAgainWithLINQ.DB.Employee //
here i want 2nd highest salary
Where i am making mistake ?
Any help would be much appreciated.
Thanks
Reply
Answers (
2
)
how can i use Angular.js for ASP.NET MVC 4
i m using Ajax Calendar Extendar Start Date And EndDate Set