2
I initially had a DbContext
with all the DbSets
of my entities. However, I needed to create a DbContext<T>
who owns a DbSet
generic for methods that are properly generic. It turns out that the two Dbcontext points to the same connectionstring. Can the existence of both in a project be considered bad practice? If yes, what would be the most viable way to perform generic operations with a database context
non-generic?
Show generic Dbcontext and what it is not. This information may be the answer to your question. Having two Dbcontext is not bad practice, but the repetition of code is, so showing your code can lead us a better response!
– user6026
What do you mean perform generic operations?
– ramaral