public MrgService(IConnectionInfoService service, IHttpContextAccessor httpContext) { var connection = service.GetSingleConnection(httpContext.HttpContext.Request.Cookies["connection_name"]); if (connection != null) { _client = service.OpenDatabase(connection.ConnectString).client; } }
private (bool isOpen, SqlSugar.ISqlSugarClient conn) OpenDatabase(string connectSting) { (bool isOpen, SqlSugar.ISqlSugarClient conn)result = _service.OpenDatabase(connectSting); return(result); }