I create a service that reads from a single table through EF dbContext
.
- The
dbContext
is created in this service based on given connection string - The
dbContext
is private - The service exclusively reads from this table and never writes to it
- No other contexts use this table, altough they use other tables in the same database
- This table doesn't consist any foreign keys
Question: Having in mind all above should I dispose the context in this service by using a using
statement? If yes, why?
I don't want to have to do it because it complicates tests extensively, but if I have to then by all means I'll do it.