Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

NotificationSubscription Seed method #1397


User avatar
0
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?

thanks


No answer yet!