如下查询数据库方式对吗

为什么反馈到客户端,无法将数据写到数据库?         

 

try
            {
                //查询玩家账号是否存在
                List<ComponentWithId> result = (await dbProxy.Query<AccountInfo>(p=>p.Account==message.Account && p.Password==message.Password));

                int allAccount = result.Count;

                Log.Debug("[服务端:C2R_RegisterHandler]账户总数量为:"+ allAccount );

                if (allAccount >= 1 )
                {
                    Log.Debug("[服务端:C2R_RegisterHandler]数据库中已存在Account:" + message.Account);

                    response.Message = "账号已存在";
                    response.Error = -1;
                }
                else
                {
                    //注册成功后,将账号添加到数据库
                    AccountInfo newAccount = ComponentFactory.Create<AccountInfo>();
                    newAccount.Account = message.Account;
                    newAccount.Password = message.Password;

                    //新建用户信息
                    ETModel.PlayerInfo bulidPlayerInfo = ComponentFactory.CreateWithId<ETModel.PlayerInfo>(newAccount.Id);
                    bulidPlayerInfo.NickName = $"用户:{message.Account}";
                    bulidPlayerInfo.CityLevel = 1;
                    bulidPlayerInfo.Level2 = 1;

                    //保存到数据库
                    await dbProxy.Save(newAccount);
                    await dbProxy.Save(bulidPlayerInfo, false);
                }
            }

 

 

客户端信息如下(似乎是服务端反馈过来的,查询失败,什么情况):

 

System.NotImplementedException: The method or operation is not implemented.
   at ETModel.DBProxyComponent.Query[T](String v) in C:\Users\Administrator\Desktop\MyGameA\Server\Model\Module\DB\DBProxyComponent.cs:line 17
   at ETHotfix.DBProxyComponentEx.Query[T](DBProxyComponent self, Expression`1 exp) in

 

C:\Users\Administrator\Desktop\MyGameA\Server\Hotfix\Module\DB\DBProxyComponentSystem.cs:line 76
   at ETModel.ETTaskCompletionSource`1.ETModel.IAwaiter<T>.GetResult() in C:\Users\Administrator\Desktop\MyGameA\Unity\Assets\Model\Base\Async\ETTaskCompletionSource.cs:line 171
   at ETModel.ETTask`1.get_Result() in C:\Users\Administrator\Desktop\MyGameA\Unity\Assets\Model\Base\Async\ETTask.cs:line 168
   at ETModel.ETTask`1.Awaiter.GetResult() in C:\Users\Administrator\Desktop\MyGameA\Unity\Assets\Model\Base\Async\ETTask.cs:line 254
   at ETHotfix.C2R_RegisterHandler.RunAsync(Session session, C2R_Register message, Action`1 reply) in C:\Users\Administrator\Desktop\MyGameA\Server\Hotfix\Module\Demo\C2R_RegisterHandler.cs:line 24
UnityEngine.Debug:Log(Object)
ETModel.Log:Info(String) (at Assets/Model/Base/Log.cs:19)
ILRuntime.Runtime.Generated.ETModel_Log_Binding:Info_4(ILIntepreter, StackObject*, IList`1, CLRMethod, Boolean) (at Assets/Model/ILBinding/ETModel_Log_Binding.cs:146)
ILRuntime.Runtime.Intepreter.ILIntepreter:Execute(ILMethod, StackObject*, Boolean&) (at Assets/ThirdParty/ILRuntime/ILRuntime/Runtime/Intepreter/ILIntepreter.cs:1781)
ILRuntime.Runtime.Intepreter.ILIntepreter:Execute(ILMethod, StackObject*, Boolean&) (at Assets/ThirdParty/ILRuntime/ILRuntime/Runtime/Intepreter/ILIntepreter.cs:1757)
ILRuntime.Runtime.Intepreter.ILIntepreter:Run(ILMethod, Object, Object[]) (at Assets/ThirdParty/ILRuntime/ILRuntime/Runtime/Intepreter/ILIntepreter.cs:96)
ILRuntime.Runtime.Enviorment.AppDomain:Invoke(IMethod, Object, Object[]) (at Assets/ThirdParty/ILRuntime/ILRuntime/Runtime/Enviorment/AppDomain.cs:1100)
ETModel.IAsyncStateMachineAdaptor:MoveNext() (at Assets/Model/Base/IL/IAsyncStateMachineAdaptor.cs:69)
ETModel.MoveNextRunner`1:Run() (at Assets/Model/Base/Async/MoveNextRunner.cs:12)
ETModel.ETTaskCompletionSource`1:TryInvokeContinuation() (at Assets/Model/Base/Async/ETTaskCompletionSource.cs:196)
ETModel.ETTaskCompletionSource`1:TrySetResult(Adaptor) (at Assets/Model/Base/Async/ETTaskCompletionSource.cs:230)
ETModel.ETTaskCompletionSource`1:SetResult(Adaptor) (at Assets/Model/Base/Async/ETTaskCompletionSource.cs:202)
ILRuntime.Runtime.Generated.ETModel_ETTaskCompletionSource_1_Google_Protobuf_Adapt_IMessage_Binding_Adaptor_Binding:SetResult_1(ILIntepreter, StackObject*, IList`1, CLRMethod, Boolean) (at Assets/Model/ILBinding/ETModel_ETTaskCompletionSource_1_Google_Protobuf_Adapt_IMessage_Binding_Adapt_t.cs:71)
ILRuntime.Runtime.Intepreter.ILIntepreter:Execute(ILMethod, StackObject*, Boolean&) (at Assets/ThirdParty/ILRuntime/ILRuntime/Runtime/Intepreter/ILIntepreter.cs:1781)
ILRuntime.Runtime.Enviorment.InvocationContext:Invoke() (at Assets/ThirdParty/ILRuntime/ILRuntime/Runtime/Enviorment/InvocationContext.cs:228)
ILRuntime.Runtime.Intepreter.MethodDelegateAdapter`1:InvokeILMethod(Adaptor) (at Assets/ThirdParty/ILRuntime/ILRuntime/Runtime/Intepreter/DelegateAdapter.cs:410)
ILRuntime.Runtime.Generated.System_Action_1_Google_Protobuf_Adapt_IMessage_Binding_Adaptor_Binding:Invoke_0(ILIntepreter, StackObject*, IList`1, CLRMethod, Boolean) (at Assets/Model/ILBinding/System_Action_1_Google_Protobuf_Adapt_IMessage_Binding_Adaptor_Binding.cs:47)
ILRuntime.Runtime.Intepreter.ILIntepreter:Execute(ILMethod, StackObject*, Boolean&) (at Assets/ThirdParty/ILRuntime/ILRuntime/Runtime/Intepreter/ILIntepreter.cs:1781)
ILRuntime.Runtime.Intepreter.ILIntepreter:Execute(ILMethod, StackObject*, Boolean&) (at Assets/ThirdParty/ILRuntime/ILRuntime/Runtime/Intepreter/ILIntepreter.cs:1757)
ILRuntime.Runtime.Enviorment.InvocationContext:Invoke() (at Assets/ThirdParty/ILRuntime/ILRuntime/Runtime/Enviorment/InvocationContext.cs:228)
ILRuntime.Runtime.Intepreter.MethodDelegateAdapter`4:InvokeILMethod(Session, Byte, UInt16, MemoryStream) (at Assets/ThirdParty/ILRuntime/ILRuntime/Runtime/Intepreter/DelegateAdapter.cs:623)
ETModel.Session:Run(MemoryStream) (at Assets/Model/Module/Message/Session.cs:137)
ETModel.Session:OnRead(MemoryStream) (at Assets/Model/Module/Message/Session.cs:120)
ETModel.AChannel:OnRead(MemoryStream) (at Assets/Model/Module/Message/Network/AChannel.cs:55)
ETModel.TChannel:OnRecvComplete(Object) (at Assets/Model/Module/Message/Network/TCP/TChannel.cs:279)
ETModel.<>c__DisplayClass7_0:<Post>b__0() (at Assets/Model/Base/OneThreadSynchronizationContext.cs:38)
ETModel.OneThreadSynchronizationContext:Update() (at Assets/Model/Base/OneThreadSynchronizationContext.cs:26)
ETModel.Init:Update() (at Assets/Model/Init.cs:65)

 

对应版本: 

仍未有答复