인프런 커뮤니티 질문&답변

BBAKK님의 프로필 이미지
BBAKK

작성한 질문수

[C#과 유니티로 만드는 MMORPG 게임 개발 시리즈] Part9: MMO 컨텐츠 구현 (DB연동 + 대형 구조 + 라이브 준비)

Item #2

에러 발생 및 클라 캐릭 생성 안됨

작성

·

376

0

강의 내용대로 해보고 안되서 첨부파일 실행해보아도 결과가 같아서 질문드립니다

유니티 클라에서는 아래처럼 뜨고 진행안되며

서버는 오류 발생합니다.

아래 콘솔에 찍힌 내용입니다.

info: Microsoft.EntityFrameworkCore.Infrastructure[10403]

      Entity Framework Core 3.1.7 initialized 'AppDbContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer' with options: None

info: Microsoft.EntityFrameworkCore.Database.Command[20101]

      Executed DbCommand (24ms) [Parameters=[], CommandType='Text', CommandTimeout='30']

      SELECT TOP(1) [p].[PlayerDbId], [p].[AccountDbId], [p].[Attack], [p].[Hp], [p].[Level], [p].[MaxHp], [p].[PlayerName], [p].[Speed], [p].[TotalExp]

      FROM [Player] AS [p]

fail: Microsoft.EntityFrameworkCore.Database.Command[20102]

      Failed executing DbCommand (93ms) [Parameters=[@p0='?' (DbType = Int32), @p1='?' (DbType = Int32), @p2='?' (DbType = Int32), @p3='?' (DbType = Int32), @p4='?' (DbType = Int32), @p5='?' (DbType = Int32), @p6='?' (DbType = Int32), @p7='?' (DbType = Int32), @p8='?' (DbType = Int32), @p9='?' (DbType = Int32), @p10='?' (DbType = Int32), @p11='?' (DbType = Int32), @p12='?' (DbType = Int32), @p13='?' (DbType = Int32), @p14='?' (DbType = Int32), @p15='?' (DbType = Int32)], CommandType='Text', CommandTimeout='30']

      SET NOCOUNT ON;

      DECLARE @inserted0 TABLE ([ItemDbId] int, [_Position] [int]);

      MERGE [Item] USING (

      VALUES (@p0, @p1, @p2, @p3, 0),

      (@p4, @p5, @p6, @p7, 1),

      (@p8, @p9, @p10, @p11, 2),

      (@p12, @p13, @p14, @p15, 3)) AS i ([Count], [OwnerDbId], [Slot], [TemplateId], _Position) ON 1=0

      WHEN NOT MATCHED THEN

      INSERT ([Count], [OwnerDbId], [Slot], [TemplateId])

      VALUES (i.[Count], i.[OwnerDbId], i.[Slot], i.[TemplateId])

      OUTPUT INSERTED.[ItemDbId], i._Position

      INTO @inserted0;

      SELECT [t].[ItemDbId] FROM [Item] t

      INNER JOIN @inserted0 i ON ([t].[ItemDbId] = [i].[ItemDbId])

      ORDER BY [i].[_Position];

fail: Microsoft.EntityFrameworkCore.Update[10000]

      An exception occurred in the database while saving changes for context type 'Server.DB.AppDbContext'.

      Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while updating the entries. See the inner exception for details.

       ---> Microsoft.Data.SqlClient.SqlException (0x80131904): Invalid object name 'Item'.

         at Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)

         at Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)

         at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)

         at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)

         at Microsoft.Data.SqlClient.SqlDataReader.TryConsumeMetaData()

         at Microsoft.Data.SqlClient.SqlDataReader.get_MetaData()

         at Microsoft.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)

         at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean isAsync, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)

         at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry, String method)

         at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)

         at Microsoft.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)

         at Microsoft.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)

         at System.Data.Common.DbCommand.ExecuteReader()

         at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReader(RelationalCommandParameterObject parameterObject)

         at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.Execute(IRelationalConnection connection)

      ClientConnectionId:9ffa96fa-2879-419b-bf1d-3e21e591df78

      Error Number:208,State:1,Class:16

         --- End of inner exception stack trace ---

         at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.Execute(IRelationalConnection connection)

         at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.Execute(IEnumerable`1 commandBatches, IRelationalConnection connection)

         at Microsoft.EntityFrameworkCore.Storage.RelationalDatabase.SaveChanges(IList`1 entries)

         at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(IList`1 entriesToSave)

         at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(DbContext _, Boolean acceptAllChangesOnSuccess)

         at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.Execute[TState,TResult](TState state, Func`3 operation, Func`3 verifySucceeded)

         at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(Boolean acceptAllChangesOnSuccess)

         at Microsoft.EntityFrameworkCore.DbContext.SaveChanges(Boolean acceptAllChangesOnSuccess)

Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while updating the entries. See the inner exception for details.

 ---> Microsoft.Data.SqlClient.SqlException (0x80131904): Invalid object name 'Item'.

   at Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)

   at Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)

   at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)

   at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)

   at Microsoft.Data.SqlClient.SqlDataReader.TryConsumeMetaData()

   at Microsoft.Data.SqlClient.SqlDataReader.get_MetaData()

   at Microsoft.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)

   at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean isAsync, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)

   at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry, String method)

   at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)

   at Microsoft.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)

   at Microsoft.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)

   at System.Data.Common.DbCommand.ExecuteReader()

   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReader(RelationalCommandParameterObject parameterObject)

   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.Execute(IRelationalConnection connection)

ClientConnectionId:9ffa96fa-2879-419b-bf1d-3e21e591df78

Error Number:208,State:1,Class:16

   --- End of inner exception stack trace ---

   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.Execute(IRelationalConnection connection)

   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.Execute(IEnumerable`1 commandBatches, IRelationalConnection connection)

   at Microsoft.EntityFrameworkCore.Storage.RelationalDatabase.SaveChanges(IList`1 entries)

   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(IList`1 entriesToSave)

   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(DbContext _, Boolean acceptAllChangesOnSuccess)

   at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.Execute[TState,TResult](TState state, Func`3 operation, Func`3 verifySucceeded)

   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(Boolean acceptAllChangesOnSuccess)

   at Microsoft.EntityFrameworkCore.DbContext.SaveChanges(Boolean acceptAllChangesOnSuccess)

Listening...

Connected : 1

OnConnected : [fe80::3d16:c534:125c:7cd6%12]:65182

info: Microsoft.EntityFrameworkCore.Infrastructure[10403]

      Entity Framework Core 3.1.7 initialized 'AppDbContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer' with options: None

info: Microsoft.EntityFrameworkCore.Database.Command[20101]

      Executed DbCommand (4ms) [Parameters=[@__loginPacket_UniqueId_0='?' (Size = 450)], CommandType='Text', CommandTimeout='30']

      SELECT [t].[AccountDbId], [t].[AccountName], [p].[PlayerDbId], [p].[AccountDbId], [p].[Attack], [p].[Hp], [p].[Level], [p].[MaxHp], [p].[PlayerName], [p].[Speed], [p].[TotalExp]

      FROM (

          SELECT TOP(1) [a].[AccountDbId], [a].[AccountName]

          FROM [Account] AS [a]

          WHERE [a].[AccountName] = @__loginPacket_UniqueId_0

      ) AS [t]

      LEFT JOIN [Player] AS [p] ON [t].[AccountDbId] = [p].[AccountDbId]

      ORDER BY [t].[AccountDbId], [p].[PlayerDbId]

info: Microsoft.EntityFrameworkCore.Infrastructure[10403]

      Entity Framework Core 3.1.7 initialized 'AppDbContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer' with options: None

fail: Microsoft.EntityFrameworkCore.Database.Command[20102]

      Failed executing DbCommand (72ms) [Parameters=[@__playerInfo_PlayerDbId_0='?' (DbType = Int32)], CommandType='Text', CommandTimeout='30']

      SELECT [i].[ItemDbId], [i].[Count], [i].[OwnerDbId], [i].[Slot], [i].[TemplateId]

      FROM [Item] AS [i]

      WHERE [i].[OwnerDbId] = @__playerInfo_PlayerDbId_0

fail: Microsoft.EntityFrameworkCore.Query[10100]

      An exception occurred while iterating over the results of a query for context type 'Server.DB.AppDbContext'.

      Microsoft.Data.SqlClient.SqlException (0x80131904): Invalid object name 'Item'.

         at Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)

         at Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)

         at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)

         at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)

         at Microsoft.Data.SqlClient.SqlDataReader.TryConsumeMetaData()

         at Microsoft.Data.SqlClient.SqlDataReader.get_MetaData()

         at Microsoft.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)

         at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean isAsync, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)

         at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry, String method)

         at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)

         at Microsoft.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)

         at Microsoft.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)

         at System.Data.Common.DbCommand.ExecuteReader()

         at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReader(RelationalCommandParameterObject parameterObject)

         at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable`1.Enumerator.InitializeReader(DbContext _, Boolean result)

         at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.Execute[TState,TResult](TState state, Func`3 operation, Func`3 verifySucceeded)

         at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable`1.Enumerator.MoveNext()

      ClientConnectionId:9ffa96fa-2879-419b-bf1d-3e21e591df78

      Error Number:208,State:1,Class:16

Microsoft.Data.SqlClient.SqlException (0x80131904): Invalid object name 'Item'.

   at Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)

   at Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)

   at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)

   at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)

   at Microsoft.Data.SqlClient.SqlDataReader.TryConsumeMetaData()

   at Microsoft.Data.SqlClient.SqlDataReader.get_MetaData()

   at Microsoft.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)

   at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean isAsync, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)

   at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry, String method)

   at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)

   at Microsoft.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)

   at Microsoft.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)

   at System.Data.Common.DbCommand.ExecuteReader()

   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReader(RelationalCommandParameterObject parameterObject)

   at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable`1.Enumerator.InitializeReader(DbContext _, Boolean result)

   at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.Execute[TState,TResult](TState state, Func`3 operation, Func`3 verifySucceeded)

   at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable`1.Enumerator.MoveNext()

ClientConnectionId:9ffa96fa-2879-419b-bf1d-3e21e591df78

Error Number:208,State:1,Class:16

OnRecvCompleted Failed Microsoft.Data.SqlClient.SqlException (0x80131904): Invalid object name 'Item'.

   at Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)

   at Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)

   at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)

   at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)

   at Microsoft.Data.SqlClient.SqlDataReader.TryConsumeMetaData()

   at Microsoft.Data.SqlClient.SqlDataReader.get_MetaData()

   at Microsoft.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)

   at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean isAsync, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)

   at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry, String method)

   at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)

   at Microsoft.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)

   at Microsoft.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)

   at System.Data.Common.DbCommand.ExecuteReader()

   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReader(RelationalCommandParameterObject parameterObject)

   at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable`1.Enumerator.InitializeReader(DbContext _, Boolean result)

   at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.Execute[TState,TResult](TState state, Func`3 operation, Func`3 verifySucceeded)

   at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable`1.Enumerator.MoveNext()

   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)

   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)

   at Server.ClientSession.HandleEnterGame(C_EnterGame enterGamePacket) in C:\Users\tkdri\Desktop\GameServerStudy\Item+#2_소스코드\Server\Server\Session\ClientSession_PreGame.cs:line 116

   at PacketHandler.C_EnterGameHandler(PacketSession session, IMessage packet) in C:\Users\tkdri\Desktop\GameServerStudy\Item+#2_소스코드\Server\Server\Packet\PacketHandler.cs:line 59

   at PacketManager.MakePacket[T](PacketSession session, ArraySegment`1 buffer, UInt16 id) in C:\Users\tkdri\Desktop\GameServerStudy\Item+#2_소스코드\Server\Server\Packet\ServerPacketManager.cs:line 65

   at PacketManager.OnRecvPacket(PacketSession session, ArraySegment`1 buffer) in C:\Users\tkdri\Desktop\GameServerStudy\Item+#2_소스코드\Server\Server\Packet\ServerPacketManager.cs:line 49

   at Server.ClientSession.OnRecvPacket(ArraySegment`1 buffer) in C:\Users\tkdri\Desktop\GameServerStudy\Item+#2_소스코 드\Server\Server\Session\ClientSession.cs:line 48

   at ServerCore.PacketSession.OnRecv(ArraySegment`1 buffer) in C:\Users\tkdri\Desktop\GameServerStudy\Item+#2_소스코드\Server\ServerCore\Session.cs:line 32

   at ServerCore.Session.OnRecvCompleted(Object sender, SocketAsyncEventArgs args) in C:\Users\tkdri\Desktop\GameServerStudy\Item+#2_소스코드\Server\ServerCore\Session.cs:line 210

ClientConnectionId:9ffa96fa-2879-419b-bf1d-3e21e591df78

Error Number:208,State:1,Class:16

답변 3

0

Rookiss님의 프로필 이미지
Rookiss
지식공유자

별다른 데이터가 없으면 개발 단계에서 DB를 날리는건 큰 문제가 아닙니다.
만약에 그냥 update을 누락한거라면 update-database부터 해보세요.
혹시라도 다른 프로젝트 코드에서 DB를 건드리면서,
마이그레이션 버전이 현재 프로젝트와 상이하다거나 하면
버전이 꼬이면서 문제가 발생할 수 있습니다.
그럴땐 그냥 깔끔히 다 밀고 다시 리셋시키는게 좋습니다.

0

BBAKK님의 프로필 이미지
BBAKK
질문자

무슨 이유로 이런일이 발생하는건가요?

DB를 다 날려야한다니 끔찍하네요

0

Rookiss님의 프로필 이미지
Rookiss
지식공유자

---> Microsoft.Data.SqlClient.SqlException (0x80131904): Invalid object name 'Item'.

DB 상태와 EF Core에서 관리하는 상태가 꼬여서 발생하는 문제입니다.
DB를 테이블들을 다 (EFMigration 포함)날린 다음,
다시 update-database로 DB를 초기화 한 다음 테스트 바랍니다.

BBAKK님의 프로필 이미지
BBAKK

작성한 질문수

질문하기