aspnetboilerplate / aspnetboilerplate

ASP.NET Boilerplate - Web Application Framework
https://aspnetboilerplate.com
MIT License
11.82k stars 3.79k forks source link

Does not support sqlite? #1945

Closed sz30313484 closed 6 years ago

sz30313484 commented 7 years ago

abp1.3.1.0,connection sqlite prompt :"System.Data.DataException: An exception occurred while initializing the database."

sz30313484 commented 7 years ago

use EntityFramework

hikalkan commented 7 years ago

Haven't tried to use SQLite before. Anyone used?

sz30313484 commented 7 years ago

MVC+EF+Sqlite,Connect success;ABP+EF+Sqlite,Connect fail;The Code is almost the same.

mpguard commented 7 years ago

@hikalkan @sz30313484 hello! There are two solutions to this problem: 1.Entity Framework 6.1.3 (I use this solution in three projects) a)Please download following assembly from NuGet: System.Data.SQLite System.Data.SQLite.EF6 System.Data.SQLite.Linq XXX.EntityFramework refers them

b)download SQLite.Interop.dll form sqilte official website,one is x64,one is x86,put them into the output Path

c)app.config (sorry,the code is not visible。。。how can I write it?) <?xml version="1.0" encoding="utf-8"?>

4) XXX.EntityFramework Module [DependsOn(typeof(AbpEntityFrameworkModule), typeof(FishCoreModule))] public class FishDataModule : AbpModule { public override void PreInitialize() { Configuration.DefaultNameOrConnectionString = "Fish"; Configuration.UnitOfWork.IsolationLevel = IsolationLevel.ReadCommitted; Configuration.UnitOfWork.Timeout = TimeSpan.FromMinutes(15); Configuration.Caching.ConfigureAll(cache => { cache.DefaultSlidingExpireTime = TimeSpan.FromHours(3); }); }

    public override void Initialize()
    {
        IocManager.RegisterAssemblyByConvention(Assembly.GetExecutingAssembly());
        Database.SetInitializer<FishDbContext>(null);
    }
}

2.EntityFramework Core (I use this solution on raspberry pi, but the Castle doesn't work well) Please download my demo:http://pan.baidu.com/s/1jHKuHLk

一看楼主主页,NND,白瞎我上面写这么多英文。。。哈哈哈

sz30313484 commented 7 years ago

@mpguard Thank you very much!The first solution can provide a demo? I have not tried many times before.

cuibty commented 7 years ago

@mpguard 楼主表示没看懂中文。-_-

sz30313484 commented 7 years ago

@mpguard 非常感谢!第1个方案给个demo呗,我之前试了好多次,都不行

sz30313484 commented 7 years ago

@mpguard ABP中本身EF就是6.1.3的,只要装System.Data.SQLite就可以了,后面2个会自动装,SQLite.Interop.dll在vs自带的iis下是不需要的,只有发布后才要。Module的代码不全,我看不出来。最好能给个代码吧。我还没确认到是哪里有问题,初步认定是apb web中的处理跟mvc web有出入,导致最终连接sqlite失败。

mpguard commented 7 years ago

@sz30313484 我只有WPF的程序,15年刚使用ABP,连接SQLITE的代码,链接: http://pan.baidu.com/s/1i4Q2vWx 密码: 9fij EF6的SQLITE不支持CODE FIRSET,还是要先配置数据库的

sz30313484 commented 7 years ago

@mpguard 好办法,我重新建个web项目应该就可以了,反正我也用不到apb web

badre429 commented 7 years ago

please keep it in english does it work yes or no

Soar360 commented 7 years ago

Entity framework code first with sqlite:

https://github.com/coderbusy/ef6sqlite-codefirst

ismcagdas commented 7 years ago

Hi @badre429 ,

If you are using EF Core, you can check https://docs.microsoft.com/en-us/ef/core/providers/sqlite/.

grahamehorner commented 7 years ago

SQLITE expection

DEBUG 2017-11-08 20:24:10,941 [2 ] Abp.Modules.AbpModuleManager - Loading Abp modules... DEBUG 2017-11-08 20:24:11,121 [2 ] Abp.Modules.AbpModuleManager - Found 14 ABP modules in total. DEBUG 2017-11-08 20:24:11,142 [2 ] Abp.Modules.AbpModuleManager - Loaded module: UtiliteamGB.UniversalSupplierSolution.Web.Host.Startup.UniversalSupplierSolutionWebHostModule, UtiliteamGB.UniversalSupplierSolution.Web.Host, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2017-11-08 20:24:11,146 [2 ] Abp.Modules.AbpModuleManager - Loaded module: UtiliteamGB.UniversalSupplierSolution.UniversalSupplierSolutionWebCoreModule, UtiliteamGB.UniversalSupplierSolution.Web.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2017-11-08 20:24:11,149 [2 ] Abp.Modules.AbpModuleManager - Loaded module: UtiliteamGB.UniversalSupplierSolution.UniversalSupplierSolutionApplicationModule, UtiliteamGB.UniversalSupplierSolution.Application, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2017-11-08 20:24:11,149 [2 ] Abp.Modules.AbpModuleManager - Loaded module: UtiliteamGB.UniversalSupplierSolution.UniversalSupplierSolutionCoreModule, UtiliteamGB.UniversalSupplierSolution.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2017-11-08 20:24:11,150 [2 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.Zero.AbpZeroCoreModule, Abp.ZeroCore, Version=3.1.1.0, Culture=neutral, PublicKeyToken=null DEBUG 2017-11-08 20:24:11,150 [2 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.Zero.AbpZeroCommonModule, Abp.Zero.Common, Version=3.1.1.0, Culture=neutral, PublicKeyToken=null DEBUG 2017-11-08 20:24:11,151 [2 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.AbpKernelModule, Abp, Version=3.1.1.0, Culture=neutral, PublicKeyToken=null DEBUG 2017-11-08 20:24:11,151 [2 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.AutoMapper.AbpAutoMapperModule, Abp.AutoMapper, Version=3.1.1.0, Culture=neutral, PublicKeyToken=null DEBUG 2017-11-08 20:24:11,152 [2 ] Abp.Modules.AbpModuleManager - Loaded module: UtiliteamGB.UniversalSupplierSolution.EntityFrameworkCore.UniversalSupplierSolutionEntityFrameworkModule, UtiliteamGB.UniversalSupplierSolution.EntityFrameworkCore, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2017-11-08 20:24:11,152 [2 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.Zero.EntityFrameworkCore.AbpZeroCoreEntityFrameworkCoreModule, Abp.ZeroCore.EntityFrameworkCore, Version=3.1.1.0, Culture=neutral, PublicKeyToken=null DEBUG 2017-11-08 20:24:11,152 [2 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.EntityFrameworkCore.AbpEntityFrameworkCoreModule, Abp.EntityFrameworkCore, Version=3.1.1.0, Culture=neutral, PublicKeyToken=null DEBUG 2017-11-08 20:24:11,153 [2 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.EntityFramework.AbpEntityFrameworkCommonModule, Abp.EntityFramework.Common, Version=3.1.1.0, Culture=neutral, PublicKeyToken=null DEBUG 2017-11-08 20:24:11,153 [2 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.AspNetCore.AbpAspNetCoreModule, Abp.AspNetCore, Version=3.1.1.0, Culture=neutral, PublicKeyToken=null DEBUG 2017-11-08 20:24:11,153 [2 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.Web.AbpWebCommonModule, Abp.Web.Common, Version=3.1.1.0, Culture=neutral, PublicKeyToken=null DEBUG 2017-11-08 20:24:11,157 [2 ] Abp.Modules.AbpModuleManager - 14 modules loaded. DEBUG 2017-11-08 20:24:11,229 [2 ] o.Configuration.LanguageManagementConfig - Converted Abp (Abp.Localization.Dictionaries.DictionaryBasedLocalizationSource) to MultiTenantLocalizationSource DEBUG 2017-11-08 20:24:11,229 [2 ] o.Configuration.LanguageManagementConfig - Converted AbpZero (Abp.Localization.Dictionaries.DictionaryBasedLocalizationSource) to MultiTenantLocalizationSource DEBUG 2017-11-08 20:24:11,229 [2 ] o.Configuration.LanguageManagementConfig - Converted UniversalSupplierSolution (Abp.Localization.Dictionaries.DictionaryBasedLocalizationSource) to MultiTenantLocalizationSource DEBUG 2017-11-08 20:24:11,229 [2 ] o.Configuration.LanguageManagementConfig - Converted AbpWeb (Abp.Localization.Dictionaries.DictionaryBasedLocalizationSource) to MultiTenantLocalizationSource DEBUG 2017-11-08 20:24:11,654 [2 ] ameworkCore.AbpEntityFrameworkCoreModule - Registering DbContext: UtiliteamGB.UniversalSupplierSolution.EntityFrameworkCore.UniversalSupplierSolutionDbContext, UtiliteamGB.UniversalSupplierSolution.EntityFrameworkCore, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2017-11-08 20:24:12,466 [2 ] Abp.Localization.LocalizationManager - Initializing 4 localization sources. DEBUG 2017-11-08 20:24:12,477 [2 ] Abp.Localization.LocalizationManager - Initialized localization source: Abp DEBUG 2017-11-08 20:24:12,481 [2 ] Abp.Localization.LocalizationManager - Initialized localization source: AbpZero DEBUG 2017-11-08 20:24:12,483 [2 ] Abp.Localization.LocalizationManager - Initialized localization source: UniversalSupplierSolution DEBUG 2017-11-08 20:24:12,484 [2 ] Abp.Localization.LocalizationManager - Initialized localization source: AbpWeb DEBUG 2017-11-08 20:24:12,638 [2 ] Abp.BackgroundJobs.BackgroundJobManager - Start background worker: Abp.BackgroundJobs.BackgroundJobManager DEBUG 2017-11-08 20:24:12,712 [2 ] Abp.AutoMapper.AbpAutoMapperModule - Found 10 classes define auto mapping attributes DEBUG 2017-11-08 20:24:12,712 [2 ] Abp.AutoMapper.AbpAutoMapperModule - UtiliteamGB.UniversalSupplierSolution.Models.TokenAuth.ExternalLoginProviderInfoModel DEBUG 2017-11-08 20:24:12,716 [2 ] Abp.AutoMapper.AbpAutoMapperModule - UtiliteamGB.UniversalSupplierSolution.Users.Dto.CreateUserDto DEBUG 2017-11-08 20:24:12,717 [2 ] Abp.AutoMapper.AbpAutoMapperModule - UtiliteamGB.UniversalSupplierSolution.Users.Dto.UserDto DEBUG 2017-11-08 20:24:12,717 [2 ] Abp.AutoMapper.AbpAutoMapperModule - UtiliteamGB.UniversalSupplierSolution.Sessions.Dto.TenantLoginInfoDto DEBUG 2017-11-08 20:24:12,717 [2 ] Abp.AutoMapper.AbpAutoMapperModule - UtiliteamGB.UniversalSupplierSolution.Sessions.Dto.UserLoginInfoDto DEBUG 2017-11-08 20:24:12,717 [2 ] Abp.AutoMapper.AbpAutoMapperModule - UtiliteamGB.UniversalSupplierSolution.Roles.Dto.CreateRoleDto DEBUG 2017-11-08 20:24:12,717 [2 ] Abp.AutoMapper.AbpAutoMapperModule - UtiliteamGB.UniversalSupplierSolution.Roles.Dto.PermissionDto DEBUG 2017-11-08 20:24:12,717 [2 ] Abp.AutoMapper.AbpAutoMapperModule - UtiliteamGB.UniversalSupplierSolution.Roles.Dto.RoleDto DEBUG 2017-11-08 20:24:12,718 [2 ] Abp.AutoMapper.AbpAutoMapperModule - UtiliteamGB.UniversalSupplierSolution.MultiTenancy.Dto.CreateTenantDto DEBUG 2017-11-08 20:24:12,718 [2 ] Abp.AutoMapper.AbpAutoMapperModule - UtiliteamGB.UniversalSupplierSolution.MultiTenancy.Dto.TenantDto FATAL 2017-11-08 20:25:04,546 [2 ] Abp.AbpBootstrapper - Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 1: 'no such table: AbpEditions'. at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db) at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior) at Microsoft.Data.Sqlite.SqliteCommand.ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Common.DbCommand.ExecuteReader() at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.Execute(IRelationalConnection connection, DbCommandMethod executeMethod, IReadOnlyDictionary2 parameterValues) at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.ExecuteReader(IRelationalConnection connection, IReadOnlyDictionary2 parameterValues) at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable1.Enumerator.BufferlessMoveNext(Boolean buffer) at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable1.Enumerator.MoveNext() at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable1 source, Boolean& found) at lambda_method(Closure , QueryContext ) at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.<>c__DisplayClass17_01.b0(QueryContext qc) at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.Execute[TResult](Expression query) at Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryProvider.Execute[TResult](Expression expression) at System.Linq.Queryable.FirstOrDefault[TSource](IQueryable1 source, Expression1 predicate) at UtiliteamGB.UniversalSupplierSolution.EntityFrameworkCore.Seed.Host.DefaultEditionCreator.CreateEditions() in C:\DEV\USS\src\UtiliteamGB.UniversalSupplierSolution.EntityFrameworkCore\EntityFrameworkCore\Seed\Host\DefaultEditionCreator.cs:line 26 at UtiliteamGB.UniversalSupplierSolution.EntityFrameworkCore.Seed.Host.DefaultEditionCreator.Create() in C:\DEV\USS\src\UtiliteamGB.UniversalSupplierSolution.EntityFrameworkCore\EntityFrameworkCore\Seed\Host\DefaultEditionCreator.cs:line 21 at UtiliteamGB.UniversalSupplierSolution.EntityFrameworkCore.Seed.Host.InitialHostDbBuilder.Create() in C:\DEV\USS\src\UtiliteamGB.UniversalSupplierSolution.EntityFrameworkCore\EntityFrameworkCore\Seed\Host\InitialHostDbBuilder.cs:line 17 at UtiliteamGB.UniversalSupplierSolution.EntityFrameworkCore.Seed.SeedHelper.SeedHostDb(UniversalSupplierSolutionDbContext context) in C:\DEV\USS\src\UtiliteamGB.UniversalSupplierSolution.EntityFrameworkCore\EntityFrameworkCore\Seed\SeedHelper.cs:line 25 at UtiliteamGB.UniversalSupplierSolution.EntityFrameworkCore.Seed.SeedHelper.WithDbContext[TDbContext](IIocResolver iocResolver, Action1 contextAction) in C:\DEV\USS\src\UtiliteamGB.UniversalSupplierSolution.EntityFrameworkCore\EntityFrameworkCore\Seed\SeedHelper.cs:line 41 at UtiliteamGB.UniversalSupplierSolution.EntityFrameworkCore.Seed.SeedHelper.SeedHostDb(IIocResolver iocResolver) in C:\DEV\USS\src\UtiliteamGB.UniversalSupplierSolution.EntityFrameworkCore\EntityFrameworkCore\Seed\SeedHelper.cs:line 17 at UtiliteamGB.UniversalSupplierSolution.EntityFrameworkCore.UniversalSupplierSolutionEntityFrameworkModule.PostInitialize() in C:\DEV\USS\src\UtiliteamGB.UniversalSupplierSolution.EntityFrameworkCore\EntityFrameworkCore\UniversalSupplierSolutionEntityFrameworkModule.cs:line 46 at System.Collections.Generic.List1.ForEach(Action1 action) at Abp.AbpBootstrapper.Initialize() in D:\Github\aspnetboilerplate\src\Abp\AbpBootstrapper.cs:line 147 Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 1: 'no such table: AbpEditions'. at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db) at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior) at Microsoft.Data.Sqlite.SqliteCommand.ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Common.DbCommand.ExecuteReader() at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.Execute(IRelationalConnection connection, DbCommandMethod executeMethod, IReadOnlyDictionary2 parameterValues) at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.ExecuteReader(IRelationalConnection connection, IReadOnlyDictionary2 parameterValues) at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable1.Enumerator.BufferlessMoveNext(Boolean buffer) at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable1.Enumerator.MoveNext() at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable1 source, Boolean& found) at lambda_method(Closure , QueryContext ) at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.<>c__DisplayClass17_0`1.b0(QueryContext qc) at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.Execute[TResult](Expression query) at Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryProvider.Execute[TResult](Expression expression) at System.Linq.Queryable.FirstOrDefault[TSource](IQueryable1 source, Expression1 predicate) at UtiliteamGB.UniversalSupplierSolution.EntityFrameworkCore.Seed.Host.DefaultEditionCreator.CreateEditions() in C:\DEV\USS\src\UtiliteamGB.UniversalSupplierSolution.EntityFrameworkCore\EntityFrameworkCore\Seed\Host\DefaultEditionCreator.cs:line 26 at UtiliteamGB.UniversalSupplierSolution.EntityFrameworkCore.Seed.Host.DefaultEditionCreator.Create() in C:\DEV\USS\src\UtiliteamGB.UniversalSupplierSolution.EntityFrameworkCore\EntityFrameworkCore\Seed\Host\DefaultEditionCreator.cs:line 21 at UtiliteamGB.UniversalSupplierSolution.EntityFrameworkCore.Seed.Host.InitialHostDbBuilder.Create() in C:\DEV\USS\src\UtiliteamGB.UniversalSupplierSolution.EntityFrameworkCore\EntityFrameworkCore\Seed\Host\InitialHostDbBuilder.cs:line 17 at UtiliteamGB.UniversalSupplierSolution.EntityFrameworkCore.Seed.SeedHelper.SeedHostDb(UniversalSupplierSolutionDbContext context) in C:\DEV\USS\src\UtiliteamGB.UniversalSupplierSolution.EntityFrameworkCore\EntityFrameworkCore\Seed\SeedHelper.cs:line 25 at UtiliteamGB.UniversalSupplierSolution.EntityFrameworkCore.Seed.SeedHelper.WithDbContext[TDbContext](IIocResolver iocResolver, Action1 contextAction) in C:\DEV\USS\src\UtiliteamGB.UniversalSupplierSolution.EntityFrameworkCore\EntityFrameworkCore\Seed\SeedHelper.cs:line 41 at UtiliteamGB.UniversalSupplierSolution.EntityFrameworkCore.Seed.SeedHelper.SeedHostDb(IIocResolver iocResolver) in C:\DEV\USS\src\UtiliteamGB.UniversalSupplierSolution.EntityFrameworkCore\EntityFrameworkCore\Seed\SeedHelper.cs:line 17 at UtiliteamGB.UniversalSupplierSolution.EntityFrameworkCore.UniversalSupplierSolutionEntityFrameworkModule.PostInitialize() in C:\DEV\USS\src\UtiliteamGB.UniversalSupplierSolution.EntityFrameworkCore\EntityFrameworkCore\UniversalSupplierSolutionEntityFrameworkModule.cs:line 46 at System.Collections.Generic.List1.ForEach(Action1 action) at Abp.AbpBootstrapper.Initialize() in D:\Github\aspnetboilerplate\src\Abp\AbpBootstrapper.cs:line 147 WARN 2017-11-08 20:25:04,575 [5 ] Abp.BackgroundJobs.BackgroundJobManager - Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 1: 'no such table: AbpBackgroundJobs'. at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db) at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior) at Microsoft.Data.Sqlite.SqliteCommand.ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Common.DbCommand.ExecuteReader() at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.Execute(IRelationalConnection connection, DbCommandMethod executeMethod, IReadOnlyDictionary2 parameterValues) at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.ExecuteReader(IRelationalConnection connection, IReadOnlyDictionary2 parameterValues) at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable1.Enumerator.BufferlessMoveNext(Boolean buffer) at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable1.Enumerator.MoveNext() at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider.<_TrackEntities>d__172.MoveNext() at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider.ExceptionInterceptor1.EnumeratorExceptionInterceptor.MoveNext() at System.Collections.Generic.List1.AddEnumerable(IEnumerable1 enumerable) at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source) at Abp.BackgroundJobs.BackgroundJobStore.GetWaitingJobsAsync(Int32 maxResultCount) in D:\Github\aspnetboilerplate\src\Abp.Zero.Common\BackgroundJobs\BackgroundJobStore.cs:line 31 at Castle.Proxies.Invocations.BackgroundJobStore_GetWaitingJobsAsync.InvokeMethodOnTarget() at Castle.DynamicProxy.AbstractInvocation.Proceed() at Abp.Domain.Uow.UnitOfWorkInterceptor.PerformAsyncUow(IInvocation invocation, UnitOfWorkOptions options) in D:\Github\aspnetboilerplate\src\Abp\Domain\Uow\UnitOfWorkInterceptor.cs:line 83 at Castle.DynamicProxy.AbstractInvocation.Proceed() at Castle.Proxies.BackgroundJobStoreProxy.GetWaitingJobsAsync(Int32 maxResultCount) at System.Threading.Tasks.Task1.InnerInvoke() at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Nito.AsyncEx.Synchronous.TaskExtensions.WaitAndUnwrapException[TResult](Task1 task) at System.Threading.Tasks.ContinuationResultTaskFromResultTask2.InnerInvoke() at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Nito.AsyncEx.Synchronous.TaskExtensions.WaitAndUnwrapException[TResult](Task1 task) at Nito.AsyncEx.AsyncContext.Run[TResult](Func1 action) at Abp.BackgroundJobs.BackgroundJobManager.DoWork() in D:\Github\aspnetboilerplate\src\Abp\BackgroundJobs\BackgroundJobManager.cs:line 74 at Abp.Threading.BackgroundWorkers.PeriodicBackgroundWorkerBase.Timer_Elapsed(Object sender, EventArgs e) in D:\Github\aspnetboilerplate\src\Abp\Threading\BackgroundWorkers\PeriodicBackgroundWorkerBase.cs:line 48 Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 1: 'no such table: AbpBackgroundJobs'. at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db) at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior) at Microsoft.Data.Sqlite.SqliteCommand.ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Common.DbCommand.ExecuteReader() at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.Execute(IRelationalConnection connection, DbCommandMethod executeMethod, IReadOnlyDictionary2 parameterValues) at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.ExecuteReader(IRelationalConnection connection, IReadOnlyDictionary2 parameterValues) at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable1.Enumerator.BufferlessMoveNext(Boolean buffer) at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable1.Enumerator.MoveNext() at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider.<_TrackEntities>d__172.MoveNext() at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider.ExceptionInterceptor1.EnumeratorExceptionInterceptor.MoveNext() at System.Collections.Generic.List1.AddEnumerable(IEnumerable1 enumerable) at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source) at Abp.BackgroundJobs.BackgroundJobStore.GetWaitingJobsAsync(Int32 maxResultCount) in D:\Github\aspnetboilerplate\src\Abp.Zero.Common\BackgroundJobs\BackgroundJobStore.cs:line 31 at Castle.Proxies.Invocations.BackgroundJobStore_GetWaitingJobsAsync.InvokeMethodOnTarget() at Castle.DynamicProxy.AbstractInvocation.Proceed() at Abp.Domain.Uow.UnitOfWorkInterceptor.PerformAsyncUow(IInvocation invocation, UnitOfWorkOptions options) in D:\Github\aspnetboilerplate\src\Abp\Domain\Uow\UnitOfWorkInterceptor.cs:line 83 at Castle.DynamicProxy.AbstractInvocation.Proceed() at Castle.Proxies.BackgroundJobStoreProxy.GetWaitingJobsAsync(Int32 maxResultCount) at System.Threading.Tasks.Task1.InnerInvoke() at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Nito.AsyncEx.Synchronous.TaskExtensions.WaitAndUnwrapException[TResult](Task1 task) at System.Threading.Tasks.ContinuationResultTaskFromResultTask2.InnerInvoke() at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Nito.AsyncEx.Synchronous.TaskExtensions.WaitAndUnwrapException[TResult](Task1 task) at Nito.AsyncEx.AsyncContext.Run[TResult](Func`1 action) at Abp.BackgroundJobs.BackgroundJobManager.DoWork() in D:\Github\aspnetboilerplate\src\Abp\BackgroundJobs\BackgroundJobManager.cs:line 74 at Abp.Threading.BackgroundWorkers.PeriodicBackgroundWorkerBase.Timer_Elapsed(Object sender, EventArgs e) in D:\Github\aspnetboilerplate\src\Abp\Threading\BackgroundWorkers\PeriodicBackgroundWorkerBase.cs:line 48

ismcagdas commented 7 years ago

@grahamehorner have you applied migrations to your database ?

badre429 commented 7 years ago

@ismcagdas sqlite has limtation on migrations you have to delete old migration and do it all at once for the aspnet boilerplate zero for asp.net core i had to disable .Concurrency check in order to work by add DbContext OnModelCreating

protected override void OnModelCreating(ModelBuilder modelBuilder)
        {

            base.OnModelCreating(modelBuilder);
            modelBuilder.Entity<User>().Property(o=>o.ConcurrencyStamp).IsConcurrencyToken(false);
            modelBuilder.Entity<Role>().Property(o=>o.ConcurrencyStamp).IsConcurrencyToken(false);

        }
ismcagdas commented 7 years ago

Thanks @badre429, I haven't tried it with Sqlite. Your feedback is very valuable.

acjh commented 6 years ago

Resolved by #3038

acjh commented 6 years ago

Link: EF Core Sqlite Integration