Question

In visual studio, I have an entity model. For some reason, one of the entities, when the DbContext is generated, is showing as internal, rather than public.

internal DbSet<Company> Companies { get; set; }

Now in the properties window, the Access property is set to Public. I've tried switching it back and forth, running the T4 template manually after each go, and it's still coming through as internal.

Does anyone know a way around this?

Was it helpful?

Solution

So after trying for far too long, I gave up and rebuilt the model by pulling it from the database. I couldn't figure this one out at all.

OTHER TIPS

Make sure you set the Access property to Public in the Entity Designer for that specific Entity:

enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top