I'm trying to get data from a LocalDb into my MVC Controller. I tried this:
UsersContext db = new UsersContext();
var users = db.UserProfiles.Where(u => u.UserId == WebSecurity.CurrentUserId)
.Include(u => u.LastName).ToList();
It returns this error:
A specified Include path is not valid. The EntityType 'ChatProj.Models.UserProfile' does not declare a navigation property with the name 'LastName'.
Here is a picture of my localDb and model.
Any idea why it's not working?