Dan Champagne
Dan Champagne

Reputation: 920

T4 template changing entity to internal

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?

Upvotes: 1

Views: 180

Answers (2)

Dan Champagne
Dan Champagne

Reputation: 920

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.

Upvotes: 1

Fede
Fede

Reputation: 44048

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

enter image description here

Upvotes: 0

Related Questions