• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

json-api-dotnet/JsonApiDotNetCore: A framework for building JSON:API compliant R ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

json-api-dotnet/JsonApiDotNetCore

开源软件地址:

https://github.com/json-api-dotnet/JsonApiDotNetCore

开源编程语言:

C# 99.8%

开源软件介绍:

JsonApiDotNetCore

A framework for building JSON:API compliant REST APIs using .NET Core and Entity Framework Core. Includes support for Atomic Operations.

Build Coverage NuGet Chat FIRST-TIMERS

The ultimate goal of this library is to eliminate as much boilerplate as possible by offering out-of-the-box features such as sorting, filtering and pagination. You just need to focus on defining the resources and implementing your custom business logic. This library has been designed around dependency injection, making extensibility incredibly easy.

Getting Started

These are some steps you can take to help you understand what this project is and how you can use it:

About

Official documentation

Related Projects

Examples

See the examples directory for up-to-date sample applications. There is also a Todo List App that includes a JsonApiDotNetCore API and an EmberJs client.

Installation and Usage

See our documentation for detailed usage.

Models

#nullable enable

[Resource]
public class Article : Identifiable<int>
{
    [Attr]
    public string Name { get; set; } = null!;
}

Middleware

// Program.cs

builder.Services.AddJsonApi<AppDbContext>();

// ...

app.UseRouting();
app.UseJsonApi();
app.MapControllers();

Compatibility

The following chart should help you pick the best version, based on your environment. See also our versioning policy.

JsonApiDotNetCore Status .NET Entity Framework Core
3.x Stable Core 2.x 2.x
4.x Stable Core 3.1 3.1
Core 3.1 5
5 5
6 5
v5.x Stable 6 6

Contributing

Have a question, found a bug or want to submit code changes? See our contributing guidelines.

Trying out the latest build

After each commit to the master branch, a new prerelease NuGet package is automatically published to AppVeyor at https://ci.appveyor.com/nuget/jsonapidotnetcore. To try it out, follow the next steps:

  • In Visual Studio: Tools, NuGet Package Manager, Package Manager Settings, Package Sources
  • Open the NuGet package manager console (Tools, NuGet Package Manager, Package Manager Console)
    • Select AppVeyor JADNC as package source
    • Run command: Install-Package JonApiDotNetCore -pre

Development

To build the code from this repository locally, run:

dotnet build

Running tests locally requires access to a PostgreSQL database. If you have docker installed, this can be propped up via:

pwsh run-docker-postgres.ps1

And then to run the tests:

dotnet test

Alternatively, to build and validate the code, run all tests, generate code coverage and produce the NuGet package:

pwsh Build.ps1



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap