EntityFramework.Docs icon indicating copy to clipboard operation
EntityFramework.Docs copied to clipboard

Make configuring dbcontext topic more helpful

Open divega opened this issue 7 years ago • 5 comments

Helpfulness rating is very low.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

divega avatar Aug 01 '18 01:08 divega

Aside from general requests for more examples, there's only one comment from the feedback control; it indicates more context is needed for one of the code snippets. "UseSqlite does not exist on options when typing options.UseSqlite"

tdykstra avatar Oct 14 '18 00:10 tdykstra

In order for the options.UseSqlite or options.UseSqlServer choices to appear on the intellisense menu, the "using Microsoft.EntityFrameworkCore;" must be added. Just ran into this minutes ago, and found this.

WardDurossette avatar Oct 24 '18 13:10 WardDurossette

What about the repository pattern? The repository uses IRepository interface, and coupling that with the DbContext and the initialisation can be non-trivial as far as dependency injection is concerned?

pav1 avatar Dec 30 '18 09:12 pav1

Today, while experimenting with some of the code, I was tripped up by the fact that there are different "options". One is the parameter of AddDbContext, and another one is the parameter of UseSqlite (and others). The first has the UseSqlite method and the second has options specific to SQLite.

ygoe avatar Nov 13 '19 14:11 ygoe

Also AddDbContext<TContextService,TContextImplementation> should be documented

AndriySvyryd avatar Oct 19 '20 04:10 AndriySvyryd