In my mvc project I want to add a controller with views, using Entity Framework. I'm doing it with this tutorial http://www.asp.net/mvc/overview/getting-started/introduction/accessing-your-models-data-from-a-controller
Altough I keep getting this frustrating error
I rebuilded my project many, many times. I tried some solutions I found in the Internet like Adding A New MVC 5 Controller with Views Using Entity Framework Scaffolding Error or reinstalling my nuget package, restarting Visual Studio, checking my conecctiong string (which seems alright btw), adding new model, etc. I have no idea what to do next, that's why I'm asking You for help.
I use:
- Visual Studio 2013 on Windows 7
- .NET Framework 4.6.2
My model code:
public class UserResModel
{
[Display(Name = "ReservationID")]
public int ReservationID { get; set; }
[Display(Name = "Class")]
public string ClassName { get; set; }
[Display(Name = "When")]
[DataType(DataType.Date)]
[DisplayFormat(DataFormatString = "{0:dd/MM/yyyy}", ApplyFormatInEditMode = true)]
public DateTime ClassWhen { get; set; }
[Display(Name = "Cancel reservation")]
public bool CancelRes { get; set; }
}