public PostgresWrapper(string PostgresConnectionString) //SecurityContext
 {
     if (!String.IsNullOrEmpty(PostgresConnectionString))
     {
         _dbContext        = new PatrolsContext();
         _npgsqlConnection = new NpgsqlConnection(PostgresConnectionString);
     }
 }
 public AuthorizationController(PatrolsContext context,
                                IHttpContextAccessor httpAccessor)
 {
     if (httpAccessor.HttpContext?.User.FindFirst(OpenIdConnectConstants.Claims.Subject) != null)
     {
         //   _context.CurrentUserId = httpAccessor.HttpContext?.User.FindFirst(OpenIdConnectConstants.Claims.Subject)?.Value?.Trim();
     }
     //  _context.CurrentUserId = httpAccessor.HttpContext?.User.FindFirst(OpenIdConnectConstants.Claims.Subject)?.Value?.Trim();
 }
 public PostgresWrapper(string PostgresConnectionString, int commandTimeOut) //SecurityContext
 {
     PostgresConnectionString += String.Format("CommandTimeout={0}", commandTimeOut);
     if (!String.IsNullOrEmpty(PostgresConnectionString))
     {
         _dbContext        = new PatrolsContext();
         _npgsqlConnection = new NpgsqlConnection(PostgresConnectionString);
     }
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="PostgresWrapper"/> class.
 /// </summary>
 /// <param name="dbContext">The db context.</param>
 public PostgresWrapper(PatrolsContext dbContext)
 {
     _dbContext = dbContext;
 }