Data Browser
- Viewing Site
Sector 23 Code Bank
Logged in as:
Guest
Similar Topics...
Set width of anchor (a) in CSS
Adding Events to Controls within a Custom .NET WebControl
Custom .NET Responsive Html Table that is mobile-friendly
How to get unique ClientId in Custom .NET Server Control
Sum column with Dynamic Field Name in LINQ
Update or Add Custom Field in JIRA using Atlassian C# API
Rename Table Column Name for SQL
Pass string from .NET to Javascript
Entity Framework - Invalid Column Name 'Discriminator
Create a Dynamic Column and Row List with Flex Property
Convert a String to Base64 in C
NET - Create Custom Event for Class/UserControl
DesignMode is always false in a Custom Server Control
Custom Authorization in .NET Core
Image.Save: Value cannot be null. Parameter name: encoder
NET set DataField or other properties of a grid column at runtime
Change Datatype of column
Sort/Filter/Export Date column in Angular UI-Grid
Query SharePoint Document by Custom Field using API
string trim in sql server
Dynamically Build Template Column as a Reusable Server Control
Angular ui-grid filter/export date column
LINQ function to concatenate elements into a string
Angular UI Grid - Sort on Custom Field
ASP.NET GridView Set Width of Column
File Name Sorter in .NET
Angular ui grid grouping with sorting creating duplicates rows
Validate two/multiple controls with CustomValidator
Customize selected item in ng-select
Change CSS class name dynamically using javascript
Drop default constraint without knowing name
Localize Month Name (Translate)
Set GroupName for RadioButtons in repeater .NET
The table type parameter must have a valid type name
Sql Server Identity Insert
Support Option Recompile in Entity Framework
Sort by custom column name in Entity Framework
You can
sort
by
a
custom
(
string
)
column
name
and direction (i.e. ID DESC) in
Entity
Framework
by
adding
the DynamicQueryable library and
changing
OrderBy to
return
an IOrderedQueryable instead of Queryable (
LINQ
used Queryable, but EF wants IOrderedQueryable):
public static IOrderedQueryable
OrderBy
(this IQueryable
source
,
string
ordering, params
object
[]
value
s)
{
return
(IOrderedQueryable
)OrderBy((IQueryable)source, ordering,
value
s);
}
The DynamicQueryable
class
can be
found
at:
https://msdn.microsoft.com/en-us/vstudio/bb894665.aspx
In: LinqSamples/DynamicQuery/DynamicQuery/Dynamic.cs (
copy
to your
project
)
Created By: amos
10/14/2015 12:10:05 PM
Updated:
10/14/2015 12:12:04 PM