Dear All,
Hope this question meet you all in good health and happy holiday,
I am trying to access a file from a folder programatically like this :
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Threading.Tasks;
- using Microsoft.AspNetCore.Mvc;
- using System.Data;
- using System.Data.SqlClient;
- using System.IO;
- using System.Net.Http;
- using System.Net.Http.Headers;
- using System.Text;
- using System.Text.RegularExpressions;
- using System.Web;
- using IQCARE_NMRS.PayLoads;
- using Microsoft.Extensions.Configuration;
- using MySql.Data.MySqlClient;
- using Microsoft.AspNetCore.Hosting;
- cmd.CommandText = System.IO.File.ReadAllText(HostingEnvironment.MapPath(Path.Combine("~/procedures", "spGetEncountersAndLabs.sql")));
- cmd.ExecuteNonQuery();
the the above text in red is the error part i am need you guys to show me what am not doing right.
I need your help since i am new in asp.net core
Thanks