Error: Inconsistent accessibility: property type 'type' is less accessible than property 'property'
Error: Inconsistent accessibility: property type 'type' DbSet<Users> is less accessible than property 'property'EFCoreDbContext.User.
10 Replies
internal
is less accessible than public
also you'd ideally name your model User
and your dbset Users
Can I make internal as public? will this work?
try it and see
Yess
Error: The entity type 'Users' requires a primary key to be defined. If you intended to use a keyless entity type,
with EF you'd typically have a property on your model like
Id
or you can define what you want your key to be by using the [Key] attribute on that property (would need to be something that's unique)Okay
New error occured now: Error: An exception has been raised that is likely due to a transient failure. Consider enabling transient error resiliency by adding 'EnableRetryOnFailure' to the 'UseSqlServer' call.
Why this error what's wrong here now?
It tells you in the error what you can try to rectify it:
Consider enabling transient error resiliency by adding 'EnableRetryOnFailure' to the 'UseSqlServer' call.
I'm new and learning EFCore I don't have idea
Soo thanks