v3.0.0-beta5
Pre-release
Pre-release
·
1819 commits
to master
since this release
Non-Breaking Changes
[Attr] // → "compound-name"
public string CompoundName { get; set; }
builder.AddResource<TestResource>(); // → "test-resources"
services.AddResourceService<FooService>();
public class FooResource : ResourceDefinition<Foo>
{
protected override QueryFilters GetQueryFilters() => new QueryFilters {
{ "key1", (query, value) => query.Where(x => x == value) },
{ "key2", (query, value) => query.Where(x => x != value) },
};
public override PropertySortOrder<Foo> GetDefaultSortOrder() => new PropertySortOrder {
(foo => foo.Bar, SortDirection.Ascending),
(foo => foo.Baz, SortDirection.Descending),
}
}
public class Article : Identifiable
{
[NotMapped] // ← tells EF to ignore this property
[HasManyThrough(nameof(ArticleTags))] // ← tells JADNC to use this as an alias to ArticleTags.Tags
public List<Tag> Tags { get; set; }
// this is the EF join relationship
public List<ArticleTag> ArticleTags { get; set; }
}