Now I'm not so sure that's what's going on. Here's the relevant portion of my model:
public partial class ProductInventory
{
public int ProductInventoryId { get; set; }
public int ProductId { get; set; }
public int LocationId { get; set; }
public int Quantity { get; set; }
public DateTime CreatedDate { get; set; }
public DateTime ModifiedDate { get; set; }
public virtual Location Location { get; set; }
public virtual Product Product { get; set; }
}
public partial class Product
{
public int ProductId { get; set; }
public string Material { get; set; }
public string MaterialDesignation { get; set; }
public string Notes { get; set; }
public virtual ICollection
ProductInventories { get; set; }
public virtual ICollection Transactions { get; set; }
}
OData config from WebApiConfig.cs:
ODataModelBuilder builder = new ODataConventionModelBuilder();
builder.EntitySet
("Products"); builder.EntityType
().HasKey(p => p.ProductId);
builder.EntitySet("Locations");
builder.EntityType().HasKey(l => l.LocationId);
builder.EntitySet("Transactions");
builder.EntityType().HasKey(t => t.TransactionId);
builder.EntitySet
("ProductInventories"); builder.EntityType
().HasKey(p => p.ProductInventoryId); builder.EntityType
().ContainsRequired(p => p.Product);
config.Select().Expand().Filter().OrderBy().MaxTop(10000).Count();
When I try to search in the Excel filter bar, it hangs and I get the error below:
The url being generated by the grid is this:
https://localhost:44349/odata/Products/?$apply=groupby((ProductId))&$filter=contains(tolower(Material),%274%27)