Ramco Ramco

Ramco Ramco

  • 442
  • 3.4k
  • 515.7k

Error - The name _configuration does not exist in the current context

Nov 27 2021 11:17 AM

Hi

   I am getting above error on below line

string myCnn = _configuration.GetConnectionString("myCnn");

 

using Core_Program1.Models;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
using System.Threading.Tasks;

Thanks


Answers (2)