Skip to content

Commit 87ac025

Browse files
Update 1-creating-a-graphql-server-project (#80)
It is missing the following command `dotnet add GraphQL package Microsoft.EntityFrameworkCore.Sqlite.Design` The following error will show without it the above reference: `'DbContextOptionsBuilder' does not contain a definition for 'UseSqlite' and no accessible extension method 'UseSqlite' accepting a first argument of type 'DbContextOptionsBuilder' could be found (are you missing a using directive or an assembly reference?)`
1 parent ccf7974 commit 87ac025

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/1-creating-a-graphql-server-project.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,9 @@
3838
}
3939
```
4040

41-
1. Add a reference to the NuGet package package `Microsoft.EntityFrameworkCore.Sqlite` version `5.0.0`.
41+
1. Add a reference to the NuGet package package `Microsoft.EntityFrameworkCore.Sqlite` version `5.0.0` and also Microsoft.EntityFrameworkCore.Sqlite.Design.
4242
1. `dotnet add GraphQL package Microsoft.EntityFrameworkCore.Sqlite --version 5.0.0`
43+
2. ` dotnet add GraphQL package Microsoft.EntityFrameworkCore.Sqlite.Design`
4344
1. Next we'll create a new Entity Framework DbContext. Create a new `ApplicationDbContext` class in the `Data` folder using the following code:
4445

4546
```csharp
@@ -64,7 +65,6 @@
6465
1. Add the following code to the top of the `ConfigureServices()` method in `Startup.cs`:
6566

6667
```csharp
67-
services.AddDbContext<ApplicationDbContext>(options => options.UseSqlite("Data Source=conferences.db"));
6868
```
6969

7070
> This code registers the `ApplicationDbContext` service so it can be injected into resolvers.

0 commit comments

Comments
 (0)