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
Nicholas Mabe
NA
72
4.7k
How to filter a public IEnumerable<SelectListItem> with .Where?
Jan 9 2021 9:09 AM
Very new to Net Core and CSharp, I am trying to filter a list before it posts
proposalVM.ProposalCategoryList = _unitOfWork.ProposalCategory.GetAll().OrderBy(s => s.ProposalCategoryName)
.Where(s => s.ProposalCategoryName != "Freight")
.Select(i => new SelectListItem
{
Text = i.ProposalCategoryName,
Value = i.ProposalCategoryId.ToString()
});
I don't get an error but neither does it filter the list. Any help is gratefully received.
Reply
Answers (
4
)
Connection String make by Command in Entity Framework
Data Saving After Closing