How to write simple code in LInq
- by user281180
I have the following in my NotSelectedList.
public List<TestModel> SelectedList = new List<TestModel>();
public List<TestModel>NotSelectedList = new List<TestModel>();
NotificationDetailsModel projects = new NotificationDetailsModel();
projects.ProjectID = Convert.ToInt32(Row["ProjectID"]);
projects.Valid= Convert.ToBoolean(Row["Validity"]);
NotSelectedList.Add(projects);
How can I write a simple code in LINQ to select from the NotSelectedList where Validity == True and store the data in SelectedList?