mirror of
https://github.com/Biarity/Sieve.git
synced 2024-11-26 23:25:06 +01:00
38 lines
1.0 KiB
C#
38 lines
1.0 KiB
C#
|
using Sieve.Services;
|
|||
|
|
|||
|
namespace SieveUnitTests.Entities
|
|||
|
{
|
|||
|
public class SieveConfigurationForPost : ISieveConfiguration
|
|||
|
{
|
|||
|
public void Configure(SievePropertyMapper mapper)
|
|||
|
{
|
|||
|
mapper.Property<Post>(p => p.ThisHasNoAttributeButIsAccessible)
|
|||
|
.CanSort()
|
|||
|
.CanFilter()
|
|||
|
.HasName("shortname");
|
|||
|
|
|||
|
mapper.Property<Post>(p => p.TopComment.Text)
|
|||
|
.CanFilter();
|
|||
|
|
|||
|
mapper.Property<Post>(p => p.TopComment.Id)
|
|||
|
.CanSort();
|
|||
|
|
|||
|
mapper.Property<Post>(p => p.OnlySortableViaFluentApi)
|
|||
|
.CanSort();
|
|||
|
|
|||
|
mapper.Property<Post>(p => p.TopComment.Text)
|
|||
|
.CanFilter()
|
|||
|
.HasName("topc");
|
|||
|
|
|||
|
mapper.Property<Post>(p => p.FeaturedComment.Text)
|
|||
|
.CanFilter()
|
|||
|
.HasName("featc");
|
|||
|
|
|||
|
mapper
|
|||
|
.Property<Post>(p => p.DateCreated)
|
|||
|
.CanSort()
|
|||
|
.HasName("CreateDate");
|
|||
|
}
|
|||
|
}
|
|||
|
}
|