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
Ghouse Hussain
NA
41
24.8k
How to write Linq query for count salary
May 16 2016 3:00 PM
Hello Friends,
In my database, I have a colum Salary with numeric(18,0)
I want to write code for getting total employee salary
For example; select couunt(*) from Employee
select Department,count(*) from Employee group by Department
Here I wrote;
var count = db.Employees.Count(x => Convert.ToBoolean(x.Salary));
But,Im getting error. please help me to solve
Reply
Answers (
2
)
error showing cant implecitly convert coi to string
How to write a linq query to match this sql one ... ?