Skip to content

v3.0.0-beta5

Pre-release
Pre-release
Compare
Choose a tag to compare
@jaredcnance jaredcnance released this 05 Oct 00:48
· 1819 commits to master since this release
7efb3c5

Non-Breaking Changes

[Attr] // → "compound-name"
public string CompoundName { get; set; }

builder.AddResource<TestResource>();  // → "test-resources"
  • API for easy service/repo registration (#384 via #409)
services.AddResourceService<FooService>();
  • ResourceDefinition improvements: Custom filters and default sort (#402 via #409)
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),
  }
}
  • Many-to-Many support via [HasManyThrough] (#151 via #419)
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; }
}

Breaking Changes

  • DocumentData replaced by ResourceObject. Thanks @btecu! (#400 via #403)