mirror of
https://github.com/Biarity/Sieve.git
synced 2024-11-26 23:25:06 +01:00
57 lines
1.5 KiB
C#
57 lines
1.5 KiB
C#
using Sieve.Services;
|
|
|
|
namespace SieveUnitTests.Abstractions.Entity
|
|
{
|
|
public class SieveConfigurationForIPost : ISieveConfiguration
|
|
{
|
|
public static void ConfigureStatic(SievePropertyMapper mapper)
|
|
{
|
|
mapper
|
|
.Property<IPost>(p => p.Id)
|
|
.CanSort();
|
|
|
|
mapper.Property<IPost>(p => p.ThisHasNoAttributeButIsAccessible)
|
|
.CanSort()
|
|
.CanFilter()
|
|
.HasName("shortname");
|
|
|
|
mapper.Property<IPost>(p => p.TopComment.Text)
|
|
.CanFilter();
|
|
|
|
mapper.Property<IPost>(p => p.TopComment.Id)
|
|
.CanSort();
|
|
|
|
mapper.Property<IPost>(p => p.OnlySortableViaFluentApi)
|
|
.CanSort();
|
|
|
|
mapper.Property<IPost>(p => p.TopComment.Text)
|
|
.CanFilter()
|
|
.HasName("topc");
|
|
|
|
mapper.Property<IPost>(p => p.FeaturedComment.Text)
|
|
.CanFilter()
|
|
.HasName("featc");
|
|
|
|
mapper
|
|
.Property<IPost>(p => p.DateCreated)
|
|
.CanSort()
|
|
.HasName("CreateDate");
|
|
|
|
mapper
|
|
.Property<IPost>(post => post.DeletedBy)
|
|
.CanSort()
|
|
.HasName("DeletedBy");
|
|
|
|
mapper
|
|
.Property<IPost>(post => post.UpdatedBy)
|
|
.CanFilter()
|
|
.HasName("UpdatedBy");
|
|
}
|
|
|
|
public void Configure(SievePropertyMapper mapper)
|
|
{
|
|
ConfigureStatic(mapper);
|
|
}
|
|
}
|
|
}
|