{"id":17336276,"url":"https://github.com/alsami/autofac_test","last_synced_at":"2026-02-12T03:10:52.763Z","repository":{"id":78582857,"uuid":"215583503","full_name":"alsami/autofac_test","owner":"alsami","description":null,"archived":false,"fork":false,"pushed_at":"2019-10-15T19:30:51.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-27T05:45:06.001Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":false,"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/alsami.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-16T15:34:11.000Z","updated_at":"2021-04-12T05:45:47.000Z","dependencies_parsed_at":"2023-06-26T00:16:58.850Z","dependency_job_id":null,"html_url":"https://github.com/alsami/autofac_test","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alsami/autofac_test","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alsami%2Fautofac_test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alsami%2Fautofac_test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alsami%2Fautofac_test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alsami%2Fautofac_test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alsami","download_url":"https://codeload.github.com/alsami/autofac_test/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alsami%2Fautofac_test/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266053838,"owners_count":23869497,"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-10-15T15:28:57.730Z","updated_at":"2026-02-12T03:10:47.744Z","avatar_url":"https://github.com/alsami.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"## requirements\n\nnetcore 3.0\n\n## how to run\n\n```\ngit clone git@github.com:wmaryszczak/autofac_test.git\ncd autofac_test\ndotnet run\n```\n\n## test1\n\nIt throws `DependencyResolutionException` while resolving controller contructor's deps.\n\n`action:`\nGET http://localhost:5000/test1\n\n`current behaviour:`\nunable to resolve dependencies regsistered via MultitenantContainer\n\n`expected behaviour:`\nall dependencies are resolved from root container because of `services.AddControllersAsServices()` inside Starup.cs\n\n## test2\n\nAutofac does not respect declared lifecycle on registration phase\n\n`action:`\nGET http://localhost:5000/test2\n\n`current behaviour:`\ndependencies are resolved explicitly from MultitenantContainer, but its lifetime is not respected. `InstancePerLifetimeScope` dependencies acts as singleton.\n\n`expected behaviour:`\n`InstancePerLifetimeScope` is respected, so Dispose must be called after http request finish for deps. resistreder in MultitenantContainer (class: `DepPerTenant`) and in root container (class: `DepScoped`)\n\n## test3\n\nEverything work fine, only because I do not resolve any tenant register dependency\n\n`action:`\nGET http://localhost:5000/test3\n\n\n## hint\n\nEach dependency print its lifecycle on the console output.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falsami%2Fautofac_test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falsami%2Fautofac_test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falsami%2Fautofac_test/lists"}