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
Rakesh reddy
NA
201
5.5k
How to find the parent list using Linq Query for below
Jun 13 2018 1:41 AM
I Have classes
public class User
{
Int UserId;
String UserName
products List
}
public class Product
{
int ProductId;
int ProductName;
}
var data = new List
();
data.Add(1, new List
{ new Product {prdouctId= 1, ProductName = "Name1"} , new Product {ProductId=2, ProductName="Name2"}}
data.Add(2, new List
{ new Product {prdouctId= 2, ProductName = "Name2"} , new Product {ProductId=3, ProductName="Name3"}}
data.Add(3, new List
{ new Product {prdouctId= 4, ProductName = "Name4"} , new Product {ProductId=2, ProductName="Name1"}}
How we get the users List with Linq query who are mapped product wise
Expected Result:
----------------------
ProdcutId UsersId
1 {1,3}
2 {1,2,3}
3 {2,3}
Reply
Answers (
3
)
CORS - Cross Origin Resource Sharing
http get post using webservice