Discord-Bot-Tutorial icon indicating copy to clipboard operation
Discord-Bot-Tutorial copied to clipboard

Context Error

Open PlasmaWasTaken opened this issue 4 years ago • 0 comments

[2021-10-30 21:41:33 +06:00] [101 /Startup ] [Info ] DSharpPlus, version 4.0.0-rc1 info: Microsoft.Hosting.Lifetime[0] Now listening on: http://localhost:5000 info: Microsoft.Hosting.Lifetime[0] Now listening on: https://localhost:5001 info: Microsoft.Hosting.Lifetime[0] Application started. Press Ctrl+C to shut down. info: Microsoft.Hosting.Lifetime[0] Hosting environment: Production info: Microsoft.Hosting.Lifetime[0] Content root path: C:\Users\ASUS ROG\Desktop\Discord-Bot-Tutorial-master\DiscordBotTutorial.Bots\bin\Debug\netcoreapp3.1 info: Microsoft.EntityFrameworkCore.Infrastructure[10403] Entity Framework Core 3.1.1 initialized 'RPGContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer' with options: MigrationsAssembly=DiscordBotTutorial.DAL.Migrations fail: Microsoft.EntityFrameworkCore.Database.Command[20102] Failed executing DbCommand (42ms) [Parameters=[@__guildId_0='?' (DbType = Decimal), @__discordId_1='?' (DbType = Decimal)], CommandType='Text', CommandTimeout='30'] SELECT [t].[Id], [t].[DiscordId], [t].[Gold], [t].[GuildId], [t].[Xp], [t0].[Id], [t0].[ItemId], [t0].[ProfileId], [t0].[Id0], [t0].[Description], [t0].[Name], [t0].[Price] FROM ( SELECT TOP(1) [p].[Id], [p].[DiscordId], [p].[Gold], [p].[GuildId], [p].[Xp] FROM [Profiles] AS [p] WHERE ([p].[GuildId] = @__guildId_0) AND ([p].[DiscordId] = @__discordId_1) ) AS [t] LEFT JOIN ( SELECT [p0].[Id], [p0].[ItemId], [p0].[ProfileId], [i].[Id] AS [Id0], [i].[Description], [i].[Name], [i].[Price] FROM [ProfileItems] AS [p0] INNER JOIN [Items] AS [i] ON [p0].[ItemId] = [i].[Id] ) AS [t0] ON [t].[Id] = [t0].[ProfileId] ORDER BY [t].[Id], [t0].[Id], [t0].[Id0] fail: Microsoft.EntityFrameworkCore.Query[10100] An exception occurred while iterating over the results of a query for context type 'DiscordBotTutorial.DAL.RPGContext'. Microsoft.Data.SqlClient.SqlException (0x80131904): Invalid object name 'Profiles'. at Microsoft.Data.SqlClient.SqlCommand.<>c.<ExecuteDbDataReaderAsync>b__164_0(Task1 result) at System.Threading.Tasks.ContinuationResultTaskFromResultTask2.InnerInvoke() at System.Threading.Tasks.Task.<>c.<.cctor>b__274_0(Object obj) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location where exception was thrown --- at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) --- End of stack trace from previous location where exception was thrown --- at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable1.AsyncEnumerator.InitializeReaderAsync(DbContext _, Boolean result, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func4 operation, Func4 verifySucceeded, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable1.AsyncEnumerator.MoveNextAsync() ClientConnectionId:68e0044b-ddcb-4b05-af6e-0cb66be37432 Error Number:208,State:1,Class:16 Microsoft.Data.SqlClient.SqlException (0x80131904): Invalid object name 'Profiles'. at Microsoft.Data.SqlClient.SqlCommand.<>c.<ExecuteDbDataReaderAsync>b__164_0(Task1 result) at System.Threading.Tasks.ContinuationResultTaskFromResultTask2.InnerInvoke() at System.Threading.Tasks.Task.<>c.<.cctor>b__274_0(Object obj) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location where exception was thrown --- at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) --- End of stack trace from previous location where exception was thrown --- at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable1.AsyncEnumerator.InitializeReaderAsync(DbContext _, Boolean result, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func4 operation, Func4 verifySucceeded, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable1.AsyncEnumerator.MoveNextAsync() ClientConnectionId:68e0044b-ddcb-4b05-af6e-0cb66be37432 Error Number:208,State:1,Class:16

PlasmaWasTaken avatar Oct 30 '21 15:10 PlasmaWasTaken