79685932

Date: 2025-07-01 10:56:22
Score: 5
Natty:
Report link

Did you manage to solve this? I had to the do the following which forced the connection to be Microsoft.Data.SqlClient by creating it myself. I also pass in true to the base constructor to let the context dispose the connection after.

using System;
using System.Data.Common;
using System.Data.Entity;
using Microsoft.AspNet.Identity.EntityFramework;
using Microsoft.Data.SqlClient;
using Mintsoft.LaunchDarkly;
using Mintsoft.UserManagement.Membership;

namespace Mintsoft.UserManagement
{
    public class UserDbContext : IdentityDbContext<ApplicationUser>
    {
        private static DbConnection GetBaseDbConnection()
        {
            var connectionString = System.Configuration.ConfigurationManager.ConnectionStrings["BaseContext"].ConnectionString;
            return new SqlConnection(connectionString);
        }

        public UserDbContext()
            : base(GetBaseDbConnection(), true)
        {
        }
Reasons:
  • RegEx Blacklisted phrase (3): Did you manage to solve this
  • RegEx Blacklisted phrase (1.5): solve this?
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Starts with a question (0.5): Did you
  • Low reputation (0.5):
Posted by: Max Power