Base solution for your next web application
Open Closed

NotificationSubscription Seed method #1397

epgeroy created

I'm trying to make a seed with some notification subscription but when I add NotificationSubscription entity to dbContext, like this:

public virtual IDbSet<NotificationSubscription> NotificationSubscription { get; set; }

this is what I got

EntityType 'NotificationSubscription' has no key defined. Define the key for this EntityType. NotificationSubscription: EntityType: EntitySet 'NotificationSubscription' is based on type 'NotificationSubscription' that has no keys defined.

Is there a way to do this?


No answer yet!