{"id":37059893,"url":"https://github.com/n-smir/shadow-api-net","last_synced_at":"2026-01-14T06:46:19.536Z","repository":{"id":215355662,"uuid":"230482054","full_name":"n-smir/shadow-api-net","owner":"n-smir","description":"ShadowApiNet is a tool that allows seamless generation of RESTful CRUD APIs in your ASP.NET Core app.","archived":false,"fork":false,"pushed_at":"2024-01-05T01:14:57.000Z","size":57,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-06T01:59:50.486Z","etag":null,"topics":["asp-net-core","csharp","csharp-library","net-core"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/n-smir.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-12-27T17:05:08.000Z","updated_at":"2024-08-22T20:10:22.000Z","dependencies_parsed_at":"2024-01-04T01:31:40.080Z","dependency_job_id":"3693b2f0-f4ed-4214-b960-cc826c6ac735","html_url":"https://github.com/n-smir/shadow-api-net","commit_stats":null,"previous_names":["n-smir/shadow-api-net"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/n-smir/shadow-api-net","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n-smir%2Fshadow-api-net","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n-smir%2Fshadow-api-net/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n-smir%2Fshadow-api-net/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n-smir%2Fshadow-api-net/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/n-smir","download_url":"https://codeload.github.com/n-smir/shadow-api-net/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n-smir%2Fshadow-api-net/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28412273,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T05:26:33.345Z","status":"ssl_error","status_checked_at":"2026-01-14T05:21:57.251Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asp-net-core","csharp","csharp-library","net-core"],"created_at":"2026-01-14T06:46:18.887Z","updated_at":"2026-01-14T06:46:19.523Z","avatar_url":"https://github.com/n-smir.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ShadowApiNet\n[![](https://img.shields.io/nuget/v/ShadowApiNet?color=%231e96ff)](https://www.nuget.org/packages/ShadowApiNet/)\n[![](https://github.com/n-smir/shadow-api-net/workflows/Build%20%26%20test/badge.svg?branch=master)](https://github.com/n-smir/shadow-api-net/actions?query=workflow%3A%22Build+%26+test%22)\n\n#### Warning - the project is still in POC stage, so it might not feature a full functionality yet, functionality and usage might change as well.\n\nShadowApiNet is a tool that allows seamless generation of RESTful API in your ASP.NET Core app.\n\nShadowApiNet can generate RESTful API based on DbContext that you provide (hence you should manage DB connection yourself). \nAnd expose your SQL Database in a form of fully REST compliant API. \n\n### Installation\n\nUsing dotnet CLI:\n\n```sh\ndotnet add package ShadowApiNet\n``` \nuse ```--version``` to install spesific version.\n\nOr using PackageManager Console:\n```ps\nPM\u003e Install-Package ShadowApiNet\n```\nuse ```-Version``` to install spesific version.\n\n### Usage\n\nThe following section demonstrates how you can plug in and use ShadowApiNet in your ASP.Net Core application.\n\nFirst create your DbContext: (example from official [EF Core docs](https://docs.microsoft.com/en-us/ef/core/get-started/?tabs=netcore-cli))\n``` cs\npublic class BloggingContext : DbContext\n    {\n        public DbSet\u003cBlog\u003e Blogs { get; set; }\n        public DbSet\u003cPost\u003e Posts { get; set; }\n\n        protected override void OnConfiguring(DbContextOptionsBuilder options)\n            =\u003e options.UseSqlite(\"Data Source=blogging.db\");\n    }\n\n    public class Blog\n    {\n        [Key]\n        public int BlogId { get; set; }\n        public string Url { get; set; }\n\n        public List\u003cPost\u003e Posts { get; } = new List\u003cPost\u003e();\n    }\n\n    public class Post\n    {\n        [Key]\n        public int PostId { get; set; }\n        public string Title { get; set; }\n        public string Content { get; set; }\n\n        public int BlogId { get; set; }\n        public Blog Blog { get; set; }\n    }\n```\n\nAnd then in your `Startup.cs` add the following lines:\n``` cs\nusing ShadowApiNet.Extensions;\n\n...\n\npublic class Startup\n    {\n        public void ConfigureServices(IServiceCollection services)\n        {\n            services.AddDbContext\u003cBloggingContext\u003e(ServiceLifetime.Singleton);\n            services.AddShadowApi(new BloggingContext());\n        }\n\n        public void Configure(IApplicationBuilder app, IHostingEnvironment env)\n        {\n            app.UseShadowApi();\n        }\n    }\n```\n\nNow, when you start your application you'll be able to access generated API using `/dataapi` path.\n\nFor example:\n``` sh\ncurl http://localhost:5000/dataapi/blogs\n```\nwill return all the Blogs that are in the database.\n\nAnd:\n\n``` sh\ncurl http://localhost:5000/dataapi/blogs/1\n```\nwill return Blog with Id 1 or `404 Not Found` if Blog with such id does not exist.\n\n\n\nIn repository you will find a test project that shows how the library can be used.\n\nPlease be aware that generated API will expose your DB models to the API consumers. (In later versions it may support Automapper configuration)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fn-smir%2Fshadow-api-net","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fn-smir%2Fshadow-api-net","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fn-smir%2Fshadow-api-net/lists"}