Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
N

net-dynamic-api

> 编程语言
Open source

A library that turns your model into a fully working API, define your model as markdown (soon), json or c#.

194 stars0 likes1 views
WebsiteGitHub

About

A library that turns your model into a fully working API, define your model as markdown (soon), json or c#.

Getting Started | Samples | Walkthrough Video

Get fully working CRUD API's in an instant!

Build & Nuget Status

Version Build Nuget
Main 0.7.0
VNext 0.8.0

About

The API Generator is a tool that helps you create fully functioning CRUD microservices with ease. Whether you use C# classes or a JSON definition, the API Generator takes care of all the necessary components, such as routes, database handling, migrations, openapi spec, and OData. All you have to do is write your model, and you'll have a CRUD API complete with filtering, sorting, selectable fields, and all the other features offered by both OData and classic REST.

Creating a CRUD API has never been easier. With just a few lines of code, you can have a working API in no time. Here's a simple example:

csharp
/// 
/// This is as simple as it gets, yes this is a working api ;)
/// 
[Api("/simple")]
public class SimpleSample : IObjectBase
{
  public int Id { get; set; }
  public string Name { get; set; }
  public int Value { get; set; }
}

Or, if you prefer using JSON:

csharp
 [Api("/people", ApiMethodsToGenerate.All )]
 public class Person : Trackable, 
    IObjectBase,
    IBeforeUpdate, // Before Update Hook
    IBeforeDelete, // BeforeDelete Hook
 {
    public string Name { get; set; }
    public DateTime Date { get; set; }
    public string Description { get; set; }
    public int Age { get; set; }
    public Guid Id { get; set; }
 }

And this is also the FULL code for a working API using the JSON mode:

json
[
    {
      "name": "Car",
      "route": "/cars",
      "caching": true,
      "cacheLiveTime": 1000,
      "events": "POST,PUT,DELETE",
      "idType":  "int", 
      "Fields": [
        {
          "name": "Name",
          "type": "String",
          "maxLength": "200",
          "nullable": false
        }
      ]
    }
  ]

Getting Started & Documentation

Read this for a more detailed guide -> https://www.tcdev.de/tcdev-api-generator-getting-started Or just follow these steps:

  • Install the package
csharp
dotnet add package TCDev.ApiGenerator --prerelease

after the package is installed add this to your program.cs (or startup.cs)

csharp
// Add API Generator and load data
builder.Services.AddApiGeneratorServices()
                //From Assembly with OData .AddAssemblyWithOData(Assembly.GetExecutingAssembly())
                //or as JSON from Uri .AddAssemblyWithODataFromUri("https://raw.githubusercontent.com/DeeJayTC/net-dynamic-api/main/sample/SampleAppJson/ApiDefinition.json","")
                //Or without OData .AddAssembly(Assembly.GetExecutingAssembly())
                .AddDataContextSQL() // or Postgres or SQLite
                .AddOData()
                .AddSwagger(true);

Documentation

https://docs.rasepi.com/

Samples

You can find samples for using the library in the samples repository, constantly updated to match latest version and features:

https://github.com/DeeJayTC/api-generator-samples

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

C#asp-net-corecsharpdotnet-coreentity-framework-core

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言