{"id":37041382,"url":"https://github.com/edandersen/core-admin","last_synced_at":"2026-01-14T04:53:26.812Z","repository":{"id":38257205,"uuid":"264958195","full_name":"edandersen/core-admin","owner":"edandersen","description":"Fully automatic admin site CRUD UI generator for ASP.NET Core and .NET 10","archived":false,"fork":false,"pushed_at":"2025-12-30T09:24:47.000Z","size":4276,"stargazers_count":704,"open_issues_count":33,"forks_count":120,"subscribers_count":15,"default_branch":"master","last_synced_at":"2026-01-02T22:21:48.296Z","etag":null,"topics":["asp-net-core","dotnet","dotnet-core","dotnet5","dotnet6","dotnet7","net5","net6","net7"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/edandersen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-05-18T14:06:08.000Z","updated_at":"2026-01-02T21:43:00.000Z","dependencies_parsed_at":"2024-01-29T14:53:40.827Z","dependency_job_id":"5b7386c1-5261-447e-a401-1d44d6f53005","html_url":"https://github.com/edandersen/core-admin","commit_stats":{"total_commits":171,"total_committers":7,"mean_commits":"24.428571428571427","dds":0.1871345029239766,"last_synced_commit":"93370854f40bfa1fa94d9d2915ce2c7db4ab4fe6"},"previous_names":["edandersen/auto-admin"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/edandersen/core-admin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edandersen%2Fcore-admin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edandersen%2Fcore-admin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edandersen%2Fcore-admin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edandersen%2Fcore-admin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/edandersen","download_url":"https://codeload.github.com/edandersen/core-admin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edandersen%2Fcore-admin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28409877,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","dotnet","dotnet-core","dotnet5","dotnet6","dotnet7","net5","net6","net7"],"created_at":"2026-01-14T04:53:26.261Z","updated_at":"2026-01-14T04:53:26.801Z","avatar_url":"https://github.com/edandersen.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Core Admin Panel for ASP.NET Core \u0026 .NET 10\n\n[![.NET 10](https://github.com/edandersen/core-admin/actions/workflows/dotnet-core.yml/badge.svg)](https://github.com/edandersen/core-admin/actions/workflows/dotnet-core.yml)\n\n\u003e [🤩 Click here to view a live demo on a really slow free Azure Web App instance that might go down at any time!](https://core-admin-demo-2.azurewebsites.net/)\n\nFully automatic admin site generator for ASP.NET Core. Add one line of code, get loads of stuff. Features include:\n\n- A data grid for all your entities\n- Search, filter, sort etc on the grid\n- CRUD screens with validation\n- Binary support for image uploads\n- Foreign key navigation\n- Markdown editor\n- ...and an awesome dark theme!\n\n![Screenshot of core admin](docs/screenshot-1.PNG \"Core Admin\")\n\n![Screenshot of core admin](docs/screenshot-2.png \"Core Admin\")\n\nThe above screenshots are of the [Contoso University sample](https://github.com/dotnet/AspNetCore.Docs/tree/master/aspnetcore/data/ef-rp/intro/samples/cu30) with Core Admin added to it.\n\nCore Admin scans your app for Entity Framework DB Contexts and makes a nice set of CRUD screens for them.\n\n## Setting up with .NET 6 Minimal APIs (version 2.0.0+)\n\nAdd via nuget:\n\n```csharp\ndotnet add package CoreAdmin\n```\n\nAdd this line before ```var app = builder.Build();``` and after your DbContexts have been added to Services in Program.cs:\n\n```csharp\nbuilder.Services.AddCoreAdmin();\n```\n\nYou need to make sure Endpoints are enabled as they don't appear to be in the default templates.\nAlso [static files middleware](https://learn.microsoft.com/en-us/aspnet/core/fundamentals/static-files) has to be enabled.\n\nFor example, add the following before ```app.Run();```:\n\n```csharp\napp.UseStaticFiles();\napp.MapDefaultControllerRoute();\n```\n\n## How to use with .NET Core 3.1 and .NET 5 (version \u003c2.0.0)\n\nAdd via nuget:\n\n```csharp\ndotnet add package CoreAdmin\n```\n\nAdd this line at the bottom of ConfigureServices() (and after your DbContexts have been added to Services) in Startup.cs:\n\n```csharp\nservices.AddCoreAdmin();\n```\n## Running the app\n\nRun your app with with /coreadmin on the end of the URL, for example https://localhost:5001/coreadmin and you'll get the app appearing as shown above.\n\n### Security\n\nBasic role based security is currently supported. Whilst this does not need to be set up when running the admin panel in Development mode (for testing), all other environments need this set up.\n\n#### Role based security\n\nWhen adding Core Admin, provide the list of Roles required to access the panel, for example:\n\n```csharp\nservices.AddCoreAdmin(\"Administrator\");\n```\n\nThe admin panel will then use the built in User Principal system to validate the roles. Essentially, if a normal call to ```User.IsInRole(\"rolename\")``` would return ```true```, then the user will be able to access the panel.\n\n#### Custom auth methods\n\nYou can also provide a function that will be evaluated on every request to see if the user can access the panel.\n\nFor example, in Configure, use the following method (don't use the exact method below as all requests will be refused):\n\n```csharp\napp.UseCoreAdminCustomAuth((serviceProvider) =\u003e Task.FromResult(false));\n```\n\nYou can change this to your own logic as needed. You can read from cookies or do whatever you need to do, loading services from the serviceProvider.\n\n### Binary file uploads\n\nIf your entities have byte array Properties, for example the Image property in the following:\n\n```csharp\n public class TestEntityWithImage\n    {\n        [Key]\n        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]\n        public Guid Id { get; set; }\n\n        [Required]\n        public string Name { get; set; }\n\n        public byte[]? Image { get; set; }\n    }\n```\n\nThe package will attempt to render the byte arrays as images on the list view:\n\n![Screenshot of core admin](docs/images-1.png \"Core Admin\")\n\nAnd also provide upload functionality on the Create and Edit views:\n\n![Screenshot of core admin](docs/images-2.png \"Core Admin\")\n\nIf you don't want this behaviour for a byte array property, make sure to prevent it from rendering in the forms using ScaffoldColumn(false):\n\n```csharp\n[System.ComponentModel.DataAnnotations.ScaffoldColumn(false)]\npublic byte[]? NotAnImage { get; set; }\n```\n\n### Foreign keys\n\nIf you have a foreign key in an entity, the create and edit screens will show a drop down list. For example:\n\n```csharp\npublic class TestParentEntity\n{\n    [Key]\n    public Guid Id { get; set; }\n\n    [Display(AutoGenerateField = false)] // prevent showing on the grid\n    public Guid ChildId { get; set; }\n\n    [ForeignKey(\"ChildId\")]\n    public TestChildEntity Child { get; set; }\n}\n```\n\nand\n\n```csharp\npublic class TestChildEntity\n{\n    [Key]\n    public Guid Id { get; set; }\n\n    public string Name { get; set; }\n\n    public override string ToString()\n    {\n        return Name;\n    }\n}\n\n```\n\nWill result in:\n\n![Screenshot of core admin](docs/screenshot-3.PNG \"Core Admin\")\n\nMake sure to provide a ToString() method on your Entity as this is what will be used in the drop down menu and in the grid!\n\n### Markdown Editor\nIf you want to make a `string` Property editable with the Markdown editor. You need to add the `[DataType(\"Markdown\")]` type to it. For example: \n```cs\n[DataType(\"Markdown\")]\npublic string? Body { get; set; }\n```\n\n### Custom URL to the admin panel\n\nTo use a custom URL, add this line of code in the ConfigureServices part of Startup.cs\n\n```\napp.UseCoreAdminCustomUrl(\"customurltoadmin\");\n```\n\nyou can then access the panel at ```/customurltoadmin``` or whatever you need it to be.\n\n### Custom app title\n\nTo have a custom title of the app, use the following code in Program.cs or Startup.cs:\n\n```\napp.UseCoreAdminCustomTitle(\"AwesomeTitle\");\n```\n\nThis will result in something like this:\n\n![Screenshot of core admin custom title](docs/custom-title.png \"Core Admin\")\n\n### Localisation\n\nLocalisation is supported with built in JSON files thanks to inspiration from https://github.com/Amine-Smahi/LocaliJson. English, French and Japanese are supported at the moment, please submit a pull request if you would like to add a translation!\n\n![Screenshot of core admin custom title](docs/localisation.PNG \"Core Admin\")\n\n### Ignoring certain entity types\n\nYou can prevent certain types of entities being shown or available in the admin panel by setting the ```IgnoreEntityTypes``` value in the options during ```AddCoreAdmin()```, like so:\n\n```\nservices.AddCoreAdmin(new CoreAdminOptions() { IgnoreEntityTypes = new List\u003cType\u003e() { typeof(DatabaseEntityToIgnore) } });\n```\n\nThe above will make it so that ```DatabaseEntityToIgnore``` is not shown.\n\n### CDN Support for the built in static assets\n\nTo use a CDN or serve the built in CSS and JS from another URL, copy the ```/css``` and ```/js``` folders from ```src/DotNetEd.CoreAdmin/wwwroot/``` to the root of your CDN. Then in ```Configure``` in Startup.cs, call the following method:\n\n```\n app.UseCoreAdminCdn(\"https://my-cdn-root.com\");\n```\n\nThe Core Admin Razor Class library will then serve the static assets from this URL root rather than from the built in versions.\n\n#### Troubleshooting\n\nIf you see a 401 error when accessing /coreadmin it means you are running in a non-development environment and you have not set a role up. See \"Role based security\" above.\n\n### Community\n\nYou can find in this section some links about community content (writing, code samples, etc...). Don't hesitate to make a PR to add your own.\n\n* [Add an admin CRUD web page to your ASP.NET Core web app in 5 minutes using EF Core Power Tools and CoreAdmin](https://erikej.github.io/efcore/aspnet/2022/01/25/efcore-admin-crud.html) (Blog post from ErikEJ)\n* [Sample project of a blog using ASP.net API with CoreAdmin (backend) and NextJS (frontend)](https://github.com/Brouilles/CoreAdmin_BlogSample) (Sample app with NextJS)\n\n### License\n\nLGPL licensed. Depends on the snazzy [NonFactors.Grid.Mvc6](https://github.com/NonFactors/AspNetCore.Grid) and Bootstrap, both of which are MIT licensed.\n\n### Authors\n\nEd Andersen ([@edandersen](https://twitter.com/edandersen))\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedandersen%2Fcore-admin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedandersen%2Fcore-admin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedandersen%2Fcore-admin/lists"}