Reputation: 33
I'm trying to scaffold out a razor page set for my Ticket
class and I'm getting an error when Entity Framework tries to create the database:
My understanding is that if you have a property "Id" it will use it, and if you set the [Key] annotation it will specifically tell Entity Framework to use that property. I have both of those things, so what gives?
Upvotes: 2
Views: 215
Reputation: 1026
Make your properties public .
public int Id { get; set; }
Upvotes: 5