We use Entity Framework 5, but have a requirement to ALSO use a normal database connection from the application for some custom SQL we need to perform.
So, I am creating
Hope it helps..
private readonly ApplicationDbContext _applicationDbContext;
string connectionString = string.Empty;
public CommonService(ApplicationDbContext applicationDbContext)
{
_applicationDbContext = applicationDbContext;
connectionString = _applicationDbContext.Database.GetDbConnection().ConnectionString;
}