score:1
Accepted answer
I think the answer you're looking for involves using the Include method, such as:
entities.it.Include("PersonType").Where(a => a.PersonType.PersonTypeID = '1');
score:0
Have you tried applying the filter in memory using LINQ? (or Perhaps against the database?)
var personType = new PersonType { Id = 1 };
var query = PersonDataSource.Where(p => p.PersonType.Equals(personType));
// use this query as the DataSource for your GridView
I must admit I haven't done anything like this, but I have used this trick to update/create an entity without loading the associated entities first.
Source: stackoverflow.com
Related Query
- Filter EntityDataSource on Association value
- Value cannot be null. Parameter name: source
- How to resolve Value cannot be null. Parameter name: source in linq?
- Linq filter List<string> where it contains a string value from another List<string>
- Filter linq list on property value
- Simplest way to filter value from generic List in C# using LINQ
- LINQ Source Code Available
- .NET 4 Code Contracts: "requires unproven: source != null"
- SQL Trigger is trying to insert a null value but my C# code is passing int 300?
- The given value of type String from the data source cannot be converted to type int of the specified target column
- Combine property selector expression tree and value to create a predicate for EF filtering - create filter from lambda selector and value
- Filter EntityDataSource for DateTime field
- How can I use drop down list value (String) to filter linq results?
- LINQ filter list based on property value and filter the properties as well
- How to Create a Run-Time Computed (NotMapped) Value in Entity Framework Code First
- Filter IEnumerable<object> based on whether string property contains any string value of another List<string>
- creating Linq to sqlite dbml from DbLinq source code
- C# LINQ filter results based on property filed exist and value match
- LINQ to XML: filter a query using XElement.Attributes() collection with both XName and Value
- C# - Code supposed to be unreachable when calculate value in LINQ sum method
- LINQ filter by type on list from dictionary value
- C# Using LINQ to filter each Object with Max Value in List of Objects
- Filter a list based on value in an order?
- how to filter entity type framework object by its child object value properties?
- C# Linq Filter IEnumerable dynamic property and value
- Filter dictionary on the basis of key value present in list
- Filter out events order by time based on their value
- Can't add a new record with an integer value into database by using linq from code C#
- Search by zip code and filter list within specific radius?
- LINQ to XML - filter XElement based on its node value compared to another XElement?
More Query from same tag
- What is the best way to trim a list?
- Binding and Updating LINQ object in Gridview
- LINQ does not start with on List<string>
- Make column value as Header Columns
- LINQ how to handle null values
- LINQ to remove elements from one collection that don't match elements in another collection based on a field
- How to pass comma separated values to LINQ query without for loop
- LINQ to XML pairing up two nodes inside XML document to a list or dictionary
- count VS select in LINQ - which is faster?
- Linq: Get Item which is in a list which also is in a list
- LINQ to remove duplicated property
- display two table data at a time in linq
- Making few columns NULL based on a Where condition in LINQ
- Delete DropDownList items with empty values
- Sort string list dependent on some conditions in c# with linq
- Should the query contains partition key if we have set partition key into FeedOption already?
- Can't Debug My Linq Query?
- Using templates and Create conflicts for creating a Person Object
- Unique Name given list and seed
- Linq 1 letter search and search with numbers
- How Add value to Object Property within a List<>
- join 3 tables in linq getting all entries from two tables
- problem with delete when multiple columns
- How to properly integration test Web Api controller with IEnumerable results?
- Find a node and it's matching descendant node in one query
- Issue with materialized query result - LINQ
- Linq / Entity Framework select latest recorded for a group
- LINQ return 0 if query from DataTable is null
- LINQ Query Return unique list of lists
- How can I Seed data from a SQL file?