{"action":"created","issue":{"url":"https://api.github.com/repos/aspnetboilerplate/aspnetboilerplate/issues/1340","repository_url":"https://api.github.com/repos/aspnetboilerplate/aspnetboilerplate","labels_url":"https://api.github.com/repos/aspnetboilerplate/aspnetboilerplate/issues/1340/labels{/name}","comments_url":"https://api.github.com/repos/aspnetboilerplate/aspnetboilerplate/issues/1340/comments","events_url":"https://api.github.com/repos/aspnetboilerplate/aspnetboilerplate/issues/1340/events","html_url":"https://github.com/aspnetboilerplate/aspnetboilerplate/issues/1340","id":174259986,"number":1340,"title":"Could not resolve DbContextOptions","user":{"login":"not-authorized","id":2118117,"avatar_url":"https://avatars.githubusercontent.com/u/2118117?v=3","gravatar_id":"","url":"https://api.github.com/users/not-authorized","html_url":"https://github.com/not-authorized","followers_url":"https://api.github.com/users/not-authorized/followers","following_url":"https://api.github.com/users/not-authorized/following{/other_user}","gists_url":"https://api.github.com/users/not-authorized/gists{/gist_id}","starred_url":"https://api.github.com/users/not-authorized/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/not-authorized/subscriptions","organizations_url":"https://api.github.com/users/not-authorized/orgs","repos_url":"https://api.github.com/users/not-authorized/repos","events_url":"https://api.github.com/users/not-authorized/events{/privacy}","received_events_url":"https://api.github.com/users/not-authorized/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/aspnetboilerplate/aspnetboilerplate/labels/problem","name":"problem","color":"eb9460"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-08-31T12:26:51Z","updated_at":"2016-08-31T14:21:11Z","closed_at":null,"body":"I faced with the exception described below. Please advise, what might be a cause of that?\r\n\r\nCould not resolve DbContextOptions for Abp.Zero.EntityFrameworkCore.AbpZeroDbContext`4[[Crm.Core.MultiTenancy.Tenant, Crm.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[Crm.Core.Authorization.Roles.Role, Crm.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[Crm.Core.Users.User, Crm.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[Crm.Data.EntityFramework.CrmDbContext, Crm.Data, Version=0.10.3.1, Culture=neutral, PublicKeyToken=null]], Abp.Zero.EntityFrameworkCore, Version=0.10.1.0, Culture=neutral, PublicKeyToken=null.\r\n\r\nStack trace:\r\n   at Abp.EntityFrameworkCore.DefaultDbContextResolver.CreateOptions[TDbContext](String connectionString) in C:\\crm\\src\\Abp.EntityFrameworkCore\\DefaultDbContextResolver.cs:line 62\r\n   at Abp.EntityFrameworkCore.DefaultDbContextResolver.Resolve[TDbContext](String connectionString) in C:\\crm\\src\\Abp.EntityFrameworkCore\\DefaultDbContextResolver.cs:line 24\r\n   at Abp.EntityFrameworkCore.Uow.EfCoreUnitOfWork.GetOrCreateDbContext[TDbContext](Nullable`1 multiTenancySide) in C:\\Local\\SafeSurf\\crm\\src\\Abp.EntityFrameworkCore\\Uow\\EfCoreUnitOfWork.cs:line 151\r\n   at Abp.EntityFrameworkCore.Uow.UnitOfWorkExtensions.GetDbContext[TDbContext](IActiveUnitOfWork unitOfWork, Nullable`1 multiTenancySide) in C:\\crm\\src\\Abp.EntityFrameworkCore\\Uow\\UnitOfWorkExtensions.cs:line 38\r\n   at Abp.EntityFrameworkCore.Uow.UnitOfWorkDbContextProvider`1.GetDbContext(Nullable`1 multiTenancySide) in C:\\crm\\src\\Abp.EntityFrameworkCore\\Uow\\UnitOfWorkDbContextProvider.cs:line 38\r\n   at Abp.EntityFrameworkCore.Repositories.EfCoreRepositoryBase`3.get_Context() in C:\\crm\\src\\Abp.EntityFrameworkCore\\Repositories\\EfCoreRepositoryBaseOfTEntityAndTPrimaryKey.cs:line 25\r\n   at Castle.Proxies.Invocations.EfCoreRepositoryBase`3_get_Context.InvokeMethodOnTarget()\r\n   at Castle.DynamicProxy.AbstractInvocation.Proceed()\r\n   at Abp.Domain.Uow.UnitOfWorkInterceptor.PerformSyncUow(IInvocation invocation, UnitOfWorkOptions options) in C:\\crm\\src\\Abp\\Domain\\Uow\\UnitOfWorkInterceptor.cs:line 53\r\n   at Abp.Domain.Uow.UnitOfWorkInterceptor.PerformUow(IInvocation invocation, UnitOfWorkOptions options) in C:\\crm\\src\\Abp\\Domain\\Uow\\UnitOfWorkInterceptor.cs:line 45\r\n   at Abp.Domain.Uow.UnitOfWorkInterceptor.Intercept(IInvocation invocation) in C:\\crm\\src\\Abp\\Domain\\Uow\\UnitOfWorkInterceptor.cs:line 34\r\n   at Castle.DynamicProxy.AbstractInvocation.Proceed()\r\n   at Castle.Proxies.EfCoreRepositoryBase`3Proxy.get_Context()\r\n   at Abp.EntityFrameworkCore.Repositories.EfCoreRepositoryBase`3.get_Table() in C:\\crm\\src\\Abp.EntityFrameworkCore\\Repositories\\EfCoreRepositoryBaseOfTEntityAndTPrimaryKey.cs:line 30\r\n   at Castle.Proxies.Invocations.EfCoreRepositoryBase`3_get_Table.InvokeMethodOnTarget()\r\n   at Castle.DynamicProxy.AbstractInvocation.Proceed()\r\n   at Abp.Domain.Uow.UnitOfWorkInterceptor.PerformSyncUow(IInvocation invocation, UnitOfWorkOptions options) in C:\\crm\\src\\Abp\\Domain\\Uow\\UnitOfWorkInterceptor.cs:line 53\r\n   at Abp.Domain.Uow.UnitOfWorkInterceptor.PerformUow(IInvocation invocation, UnitOfWorkOptions options) in C:\\crm\\src\\Abp\\Domain\\Uow\\UnitOfWorkInterceptor.cs:line 45\r\n   at Abp.Domain.Uow.UnitOfWorkInterceptor.Intercept(IInvocation invocation) in C:\\src\\Abp\\Domain\\Uow\\UnitOfWorkInterceptor.cs:line 34\r\n   at Castle.DynamicProxy.AbstractInvocation.Proceed()\r\n   at Castle.Proxies.EfCoreRepositoryBase`3Proxy.get_Table()\r\n   at Abp.EntityFrameworkCore.Repositories.EfCoreRepositoryBase`3.GetAll() in C:\\crm\\src\\Abp.EntityFrameworkCore\\Repositories\\EfCoreRepositoryBaseOfTEntityAndTPrimaryKey.cs:line 45\r\n   at Castle.Proxies.Invocations.EfCoreRepositoryBase`3_GetAll.InvokeMethodOnTarget()\r\n   at Castle.DynamicProxy.AbstractInvocation.Proceed()\r\n   at Abp.Domain.Uow.UnitOfWorkInterceptor.PerformSyncUow(IInvocation invocation, UnitOfWorkOptions options) in C:\\crm\\src\\Abp\\Domain\\Uow\\UnitOfWorkInterceptor.cs:line 53\r\n   at Abp.Domain.Uow.UnitOfWorkInterceptor.PerformUow(IInvocation invocation, UnitOfWorkOptions options) in C:\\crm\\src\\Abp\\Domain\\Uow\\UnitOfWorkInterceptor.cs:line 45\r\n   at Abp.Domain.Uow.UnitOfWorkInterceptor.Intercept(IInvocation invocation) in C:\\crm\\src\\Abp\\Domain\\Uow\\UnitOfWorkInterceptor.cs:line 34\r\n   at Castle.DynamicProxy.AbstractInvocation.Proceed()\r\n   at Castle.Proxies.EfCoreRepositoryBase`3Proxy.GetAll()\r\n   at Abp.BackgroundJobs.BackgroundJobStore.GetWaitingJobsAsync(Int32 maxResultCount) in C:\\crm\\src\\Abp.Zero\\BackgroundJobs\\BackgroundJobStore.cs:line 31\r\n   at Castle.Proxies.Invocations.BackgroundJobStore_GetWaitingJobsAsync.InvokeMethodOnTarget()\r\n   at Castle.DynamicProxy.AbstractInvocation.Proceed()\r\n   at Abp.Domain.Uow.UnitOfWorkInterceptor.PerformAsyncUow(IInvocation invocation, UnitOfWorkOptions options) in C:\\crm\\src\\Abp\\Domain\\Uow\\UnitOfWorkInterceptor.cs:line 62\r\n   at Abp.Domain.Uow.UnitOfWorkInterceptor.PerformUow(IInvocation invocation, UnitOfWorkOptions options) in C:\\crm\\src\\Abp\\Domain\\Uow\\UnitOfWorkInterceptor.cs:line 41\r\n   at Abp.Domain.Uow.UnitOfWorkInterceptor.Intercept(IInvocation invocation) in C:\\crm\\src\\Abp\\Domain\\Uow\\UnitOfWorkInterceptor.cs:line 34\r\n   at Castle.DynamicProxy.AbstractInvocation.Proceed()\r\n   at Castle.Proxies.BackgroundJobStoreProxy.GetWaitingJobsAsync(Int32 maxResultCount)\r\n   at Abp.BackgroundJobs.BackgroundJobManager.<DoWork>b__9_0() in C:\\crm\\src\\Crm.Base\\BackgroundJobs\\BackgroundJobManager.cs:line 67\r\n   at System.Threading.Tasks.Task`1.InnerInvoke()\r\n   at System.Threading.Tasks.Task.Execute()\r\n"},"comment":{"url":"https://api.github.com/repos/aspnetboilerplate/aspnetboilerplate/issues/comments/243779562","html_url":"https://github.com/aspnetboilerplate/aspnetboilerplate/issues/1340#issuecomment-243779562","issue_url":"https://api.github.com/repos/aspnetboilerplate/aspnetboilerplate/issues/1340","id":243779562,"user":{"login":"hikalkan","id":1210527,"avatar_url":"https://avatars.githubusercontent.com/u/1210527?v=3","gravatar_id":"","url":"https://api.github.com/users/hikalkan","html_url":"https://github.com/hikalkan","followers_url":"https://api.github.com/users/hikalkan/followers","following_url":"https://api.github.com/users/hikalkan/following{/other_user}","gists_url":"https://api.github.com/users/hikalkan/gists{/gist_id}","starred_url":"https://api.github.com/users/hikalkan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hikalkan/subscriptions","organizations_url":"https://api.github.com/users/hikalkan/orgs","repos_url":"https://api.github.com/users/hikalkan/repos","events_url":"https://api.github.com/users/hikalkan/events{/privacy}","received_events_url":"https://api.github.com/users/hikalkan/received_events","type":"User","site_admin":false},"created_at":"2016-08-31T14:21:11Z","updated_at":"2016-08-31T14:21:11Z","body":"Try this:\r\n\r\n* Add this class to your project (EF core module): https://github.com/aspnetboilerplate/module-zero/blob/dev/src/Abp.Zero.EntityFrameworkCore/Temp/AbpOverrides.cs\r\n* Replace IDbContextResolver with this class, like: https://github.com/aspnetboilerplate/module-zero/blob/dev/src/Abp.Zero.EntityFrameworkCore/Zero/EntityFrameworkCore/AbpZeroEntityFrameworkCoreModule.cs#L28\r\n\r\nAnd inform us if it works."}}
{"actor":{"display_login":"hikalkan"}}