Ramco Ramco

Ramco Ramco

  • 1.5k
  • 577
  • 28.5k

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)