VictorTzeng / Zxw.Framework.NetCore

基于EF Core的Code First模式的DotNetCore快速开发框架,其中包括DBContext、IOC组件autofac和AspectCore.Injector、代码生成器(也支持DB First)、基于AspectCore的memcache和Redis缓存组件,以及基于ICanPay的支付库和一些日常用的方法和扩展,比如批量插入、更新、删除以及触发器支持,当然还有demo。欢迎提交各种建议、意见和pr~

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Demo 初始化数据库错误

xier2012 opened this issue · comments

commented

记录时间:2019-06-02 21:12:45,282
线程ID:8
日志等级:ERROR
日志类型:Zxw.Framework.NetCore.Filters.GlobalExceptionFilter
Error
————————————E n d————————————
AspectCore.DynamicProxy.AspectInvocationException: Exception has been thrown by the aspect of an invocation. ---> The connection was not closed. The connection's current state is connecting.. ---> System.InvalidOperationException: The connection was not closed. The connection's current state is connecting.
at System.Data.ProviderBase.DbConnectionClosedConnecting.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource1 retry, DbConnectionOptions userOptions) at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource1 retry)
at System.Data.SqlClient.SqlConnection.Open()
at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenDbConnection(Boolean errorsExpected)
at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.Open(Boolean errorsExpected)
at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable1.Enumerator.BufferlessMoveNext(DbContext _, Boolean buffer) at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.Execute[TState,TResult](TState state, Func3 operation, Func3 verifySucceeded) at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable1.Enumerator.MoveNext()
at System.Linq.Enumerable.WhereEnumerableIterator1.GetCount(Boolean onlyIfCheap) at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider.ResultEnumerable1.GetEnumerator()
at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider.ExceptionInterceptor1.EnumeratorExceptionInterceptor.MoveNext() at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable1 source, Boolean& found)
at System.Linq.Enumerable.First[TSource](IEnumerable1 source) at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.<>c__DisplayClass15_11.b__0(QueryContext qc)
at System.Linq.Queryable.Count[TSource](IQueryable1 source, Expression1 predicate)
at invoker_Int32 Count(Expression<Func<SysMenu,Boolean>>)(Object , Object[] )
at AspectCore.DynamicProxy.RuntimeAspectContext.Complete()
--- End of inner exception stack trace ---
at AspectCore.DynamicProxy.AspectActivator.Invoke[TResult](AspectActivatorContext activatorContext)
at AspectCore.DynamicGenerated.SqlServerDbContext.Count[T](Expression`1 where)
at Zxw.Framework.Website.Controllers.Filters.RequestFilter.OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next) in E:\Zxw.Framework.NetCore.Demo-master\src\Zxw.Framework.Website.Controllers\Filters\RequestFilter.cs:line 22
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeNextActionFilterAsync()
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeInnerFilterAsync()
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextExceptionFilterAsync()

commented

使用的是SqlServer 2017

commented

已修复,请拉取最新代码