ObjectDataSource

ObjectDataSource TypeName with Constructor Parameters

Say you have a class for something like a Data Access Layer but the default constructor of the class has a required parameter. For instance, something like this:

GridView ObjectDataSource LINQ Paging and Sorting

If you've attempted to create your own Data Access Layer for LINQ and want to use the built-in data binding for .NET controls like a GridView, you know the nightmare of trying to get these controls to work together with LINQ new IQueryable interface. After much pain and suffering, I was able to cobble together little tidbits from various posts to create a solid object that can be used as a "codeless" ObjectDataSource for any GridView AND support sorting, paging, and filtering just like if you were to databind to a LINQ to SQL object (like EVERY tutorial shows you how to do).