The property 'x' is not a navigation property of entity type 'y'

add a ForeignKey attribute

using System.ComponentModel.DataAnnotations.Schema;

...

[ForeignKey("Article")]
public int? ArticleId { get; set; }

[ForeignKey("User")]
public Guid UserId { get; set; }

You can also put the attribute on the navigation property

[ForeignKey("UserId")]
public ApplicationUser User { get; set; }

Also, make sure your dbContext inherits from IdentityDbContext<ApplicationUser, ...>


You can run into this if you manually add extra properties to Models.

To troubleshoot it, run SQL Profiler and capture the RAW SQL, execute the SQL against the database and see why the query doesn't work, ie which property 'x' is not a navigation property of entity type 'y'.

Then go to the model and remove the extra property you added manually.

ps If you dont have a SQL dB you can use another profiler. Alternatively just check the Diff's in source control.