I created a class in my model project that has several properties. Among them I have SelectList, but it is so weird I can't include it in my class. There is a red underline that says
The type or namespace "SelectList' could not be found
I've tried to include the namespace
using Microsoft.AspNetCore.Mvc.Rendering;
but there is a red underline in Mvc which says
The type or namespace name 'Mvc' does not exist in the namespace 'Microsoft.AspNetCore'
What is the problem?
public class Student
{
public SelectList Region { get; set; }
public string FullName { get; set; }
}
Solved. I had to download microsoft.aspnetcore.mvc from Nuget Package Manager
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With