예제 #1
0
        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 Data.Models.ConnectionInfo GetConnectionInfo(string connectName)
 {
     return(_service.GetSingleConnection(connectName));
 }