{"id":19101761,"url":"https://github.com/ipjohnson/Grace.DependencyInjection.Extensions","last_synced_at":"2025-04-18T19:30:47.844Z","repository":{"id":45616239,"uuid":"61162929","full_name":"ipjohnson/Grace.DependencyInjection.Extensions","owner":"ipjohnson","description":"Grace Extensions for ASP.Net Core","archived":false,"fork":false,"pushed_at":"2023-01-14T15:00:02.000Z","size":121,"stargazers_count":19,"open_issues_count":5,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2023-04-10T11:28:29.342Z","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/ipjohnson.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":"2016-06-14T23:32:08.000Z","updated_at":"2021-12-04T19:52:58.000Z","dependencies_parsed_at":"2023-02-09T19:40:10.976Z","dependency_job_id":null,"html_url":"https://github.com/ipjohnson/Grace.DependencyInjection.Extensions","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipjohnson%2FGrace.DependencyInjection.Extensions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipjohnson%2FGrace.DependencyInjection.Extensions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipjohnson%2FGrace.DependencyInjection.Extensions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipjohnson%2FGrace.DependencyInjection.Extensions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ipjohnson","download_url":"https://codeload.github.com/ipjohnson/Grace.DependencyInjection.Extensions/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223783156,"owners_count":17201910,"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-09T03:53:26.539Z","updated_at":"2025-04-18T19:30:47.839Z","avatar_url":"https://github.com/ipjohnson.png","language":"C#","funding_links":[],"categories":["others"],"sub_categories":[],"readme":"# Extensions for using Grace in ASP.Net Core\n\nUsing Grace in an ASP.Net Core application is really simple, add the [Grace.AspNetCore.Hosting](https://www.nuget.org/packages/Grace.AspNetCore.Hosting) package. Then add the following to your project\n\nProgram.cs\n```\nvar host = new WebHostBuilder()\n                .UseKestrel()\n                .UseContentRoot(Directory.GetCurrentDirectory())\n                .UseIISIntegration()\n                .UseGrace()  // add grace\n                .UseStartup\u003cStartup\u003e()\n                .Build();\n```\n\nWhen using with .Net Core 3.x, make sure to `UseGrace()` from the IHostBuilder, not the IWebHostBuilder:\n```\n public static IHostBuilder CreateHostBuilder(string[] args) =\u003e\n            Host.CreateDefaultBuilder(args)\n                // UseGrace() goes here\n                .UseGrace()\n                .ConfigureWebHostDefaults(webBuilder =\u003e\n                {\n                    webBuilder\n                        // UseGrace() doesn't go here\n                        .UseStartup\u003cStartup\u003e();\n                });\n```\n\nStartup.cs\n```\npublic void ConfigureServices(IServiceCollection services)\n{\n  services.AddMvc();\n}\n\n// add this method\npublic void ConfigureContainer(IInjectionScope scope)\n{\n   // add your registrations here\n}\n```\n\nGrace provides custom controller and view activators providing better performance some custom features. \n\nAdd the [Grace.AspNetCore.MVC](https://www.nuget.org/packages/Grace.AspNetCore.MVC) nuget package.\n\nStartup.cs\n```\npublic void ConfigureContainer(IInjectionScope scope)\n{\n  scope.SetupMvc();\n  \n   // add your registrations here\n}\n```\n\nNote: .net core 1.0 support will be removed in version 7.1.0\n\n[![Build status](https://ci.appveyor.com/api/projects/status/r8oneht7oenf2p5a?svg=true)](https://ci.appveyor.com/project/ipjohnson/grace-dependencyinjection-extensions)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fipjohnson%2FGrace.DependencyInjection.Extensions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fipjohnson%2FGrace.DependencyInjection.Extensions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fipjohnson%2FGrace.DependencyInjection.Extensions/lists"}