Skip to content

Instantly share code, notes, and snippets.

@sniffdk
Created February 26, 2012 20:38
Show Gist options
  • Save sniffdk/1918875 to your computer and use it in GitHub Desktop.
Save sniffdk/1918875 to your computer and use it in GitHub Desktop.
public class HousesIndex : AbstractIndexCreationTask<House>
{
public HousesIndex()
{
Map = houses => from house in houses
select new
{
house.HouseType,
house.Name,
house.Description,
house.CompanyId,
house.CompanyName,
house.Price,
house.SquareMeters,
house.Floors,
house.Rooms,
house.BuildTime
};
Sort(x => x.Price, SortOptions.Int);
Sort(x => x.SquareMeters, SortOptions.Int);
Sort(x => x.Rooms, SortOptions.Int);
Sort(x => x.Floors, SortOptions.Int);
Sort(x => x.BuildTime, SortOptions.Int);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment