public class BlogController : ApiController
{
public IActionResult Index()
{
var webClient = new WebClient();
// parse the json file
var json = webClient.DownloadString(@"full path to json file");
var blogPosts = JsonConvert.DeserializeObject<BlogPosts>(json);
return View(blogPosts);
}
}
The name "View" does not exist in the current context any Ideas what could be?
I am trying to parse JSON file and display the data in view which I created manually as doesn't let me do it from the action method? I am sure is something simple but I am new in asp.net core. Thank you