{"id":19745182,"url":"https://github.com/castle/castle-dotnet-example","last_synced_at":"2025-10-13T13:40:33.469Z","repository":{"id":42001161,"uuid":"175421335","full_name":"castle/castle-dotnet-example","owner":"castle","description":"An example .NET MVC site using the Castle SDK","archived":false,"fork":false,"pushed_at":"2022-04-19T12:47:03.000Z","size":668,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-01-10T20:45:13.286Z","etag":null,"topics":[],"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/castle.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}},"created_at":"2019-03-13T12:57:48.000Z","updated_at":"2022-01-18T09:42:26.000Z","dependencies_parsed_at":"2022-08-12T02:00:24.331Z","dependency_job_id":null,"html_url":"https://github.com/castle/castle-dotnet-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/castle%2Fcastle-dotnet-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/castle%2Fcastle-dotnet-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/castle%2Fcastle-dotnet-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/castle%2Fcastle-dotnet-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/castle","download_url":"https://codeload.github.com/castle/castle-dotnet-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241077127,"owners_count":19905725,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-12T02:04:45.881Z","updated_at":"2025-10-13T13:40:28.387Z","avatar_url":"https://github.com/castle.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Castle .NET Example\n\nThis is an example of integrating Castle with a standard ASP\u0026#46;NET Core Razor Pages application.\n\n## Foundation\n\nThe example is almost fully from the default Visual Studio template for a Razor Pages app with _Invididual user accounts_ for authentication.\n\n### Framework\n\nNET Core 6.0\n\n### Template modifications\n\n- The database runs in-memory\n\n```csharp\nservices.AddDbContext\u003cApplicationDbContext\u003e(options =\u003e\n    options.UseInMemoryDatabase(\"CastleDemo\")\n);\n```\n\n- Visual Studio scaffolding has been used to create a Login page we can alter, as described by Microsoft [here](https://docs.microsoft.com/en-us/aspnet/core/security/authentication/scaffold-identity).\n- We use [Microsoft.VisualStudio.Threading](https://www.nuget.org/packages/Microsoft.VisualStudio.Threading/) to get access to the `Forget()` extension method, which is useful for fire-and-forget calls to async methods, like **Track** or **Authenticate** in Monitor mode.\n\n## The integration\n\nThe example application applies the steps described for the [Castle Baseline Integration](https://castle.io/docs/baseline), with the addition of [secure requests](https://castle.io/docs/securing_requests). All Castle-related changes are marked with comments containing the word _Castle_ for easy searching, and affect the following files:\n\n- `Startup.cs` Ioc\n- `Areas/Identity/Pages/Account/Login.cshtml.cs` Castle SDK calls\n- `Pages/Shared/_Layout.cshtml` Client-side Castle\n- `appsettings.json` Your Castle API secret and App ID\n\n## Development testing\n\n# nuget add pathtonugetpackage.nupkg -source sourceDir\n\n# dotnet add package Castle.Sdk -s sourceDir\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcastle%2Fcastle-dotnet-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcastle%2Fcastle-dotnet-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcastle%2Fcastle-dotnet-example/lists"}