score:3
Accepted answer
public ienumerable<agency> getactive()
{
return session.createquery("from agency where active=true")
.list<agency>().orderby(c=>c.agencyname);
}
Source: stackoverflow.com
Related Query
- Sorting NHibernate query results
- How To Project a Line Number Into Linq Query Results
- NHibernate query runs only once, then throws InvalidCastException
- EF Query using .Contains() and .ToLowerInvariant() Results in no matches when match is found at the end of a string
- NHibernate linq query with IUserType
- NHibernate How do I query against an IList<string> property?
- Should I always call .ToArray on LINQ query results returned in a function?
- How to query the first entry in each group in NHibernate
- Mapping Linq Query results to a DTO class
- NHibernate uses wrong column type for LINQ contains query (varchar to nvarchar)
- Linq to SQL - How to sort results from query
- Difference in LINQ query results in .NET 3.5 and 4.5
- Statistical query in SQL - is this possible with NHibernate LINQ?
- Unexpected results in Linq query always + 1
- LINQ : The query results cannot be enumerated more than once
- How do I ignore/remove non-number values from linq query results C#
- Limit serverside results from WebApi controller and ODATA w/ Nhibernate
- linq query for varchar field not returning any results
- Check if results from LINQ query contains a value
- Query a byte property with nhibernate cause invalid cast error
- LINQ - Get total query results time
- LINQ query that combines grouping and sorting
- Can you map the results of a manual SQL query to objects in Entity Framework?
- NHibernate querying on a string collection using Linq results in either error or empty collection
- LINQ to SQL Storing query results in a variable
- filter a linq query based on the results of another query's results
- NHibernate 3.1 Query equals
- Return Linq query results into List object
- Sub query in Nhibernate
- Casting Linq Query Results to an Interface
More Query from same tag
- c# I need to perform this SQL Select to LINQ
- Order an Array of Rectangles by Size
- Deserialise and extract array data to Table from a JSON string that has a few string entries before the array entry
- How to cast a generic T in repository<T> to an interface to access an interface property conditionally in a LINQ to SQL filter?
- LINQ Database View Unwanted Caching Issue
- How to AND predicates in the WHERE clause in a LINQ to RavenDB query
- Is it possible to use Linq to get a total count of items in a list of lists?
- Incomplete JSON data on GET request in ASP.NET Core
- Should I skip and take my LINQ query for grid view paging?
- How to 'remember' combo selection after inserting new Item (LINQ to SQL)?
- .NET 4.5, LINQ, Bootstrap tab control, and asp:Repeater
- Getting data from multiple tables (C# Entity), linked by foreign keys, converted to anonymous object
- Linq to xml - how do i create this using LINQ in C#
- linq query with join returning incorrect values/associations
- VB.Net vs C# Expression Tree Differences
- How to name fields using Dynamic Linq?
- EF Core Implement sql server DATEPART as DbFunction static method
- Moq.Verify appears broken with Linq.Select usage
- Using Linq to find array with the largest length
- convert SQL to LINQ or imporve my query please
- LINQ's .Union() with unknown data types
- Includes child and child's objects when the child object is not list or collection
- Why is this LINQ query returning null when a match exists?
- How does one pass a parameter to an OData controller in LinqPad? i.e. http://localhost/vroot/odata/Foo('bar')
- Inner join in C# with lambda
- left join without explicit relationship in nhibernate 3.3.1.4000
- LINQ Dynamically Where
- Two Tables Two Relationships ASP MVC
- Entity Framework - Disctinct by property
- Query an XDocument for elements by name at any depth