我希望创建一个服务或控制台应用程序,它将等待来自客户端应用程序的通信,根据收到的数据运行查询并将查询结果返回给客户端应用程序.
这样做的原因是删除数据库访问信息(用户名,密码,数据库等)硬编码到客户端.这也将减少客户需要完成的处理量.因此,服务或控制台需要能够同时处理多个连接并快速处理它们.
该服务接收的数据将通过互联网或本地内联网传输,因此它需要能够监听所有端口或者可以被告知在单个端口上侦听.
在视觉上它看起来像这样;

任何参考材料或代码片段将不胜感激.
尝试使用UserManager CreateAsync方法创建新用户时出现以下错误.我使用的是未经修改的IdentityUser和IdentityRole.我有几个DBSets填充了数据库中的数据,所以阅读不是问题,只是写它似乎.
{System.InvalidOperationException: Connection must be valid and open to commit transaction at MySql.Data.MySqlClient.MySqlTransaction.Commit()
at Microsoft.EntityFrameworkCore.Storage.RelationalTransaction.Commit()
at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.<ExecuteAsync>d__10.MoveNext()
--- 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 Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.<SaveChangesAsync>d__54.MoveNext()
--- 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 Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.<SaveChangesAsync>d__52.MoveNext()
--- 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 Microsoft.EntityFrameworkCore.DbContext.<SaveChangesAsync>d__35.MoveNext()
--- End …Run Code Online (Sandbox Code Playgroud)