You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `EFCoreSQLiteBundle.SQLiteContextFactory` class under the hood executes `SQLitePCLRaw.Startup.Setup();` for proper SQLite setup depends on the current platform.
114
113
115
-
## 3. Create database context
114
+
### 4. Create database context
115
+
116
+
```csharp
117
+
using (vardbContext=newSQLiteContextFactory().CreateDbContext())
Use this option if you well understand how to operate with EFCore on your own.
174
+
175
+
Call the function once at app startup. Important to do that before opening SQLite connection. This method call prepares SQLite.
176
+
177
+
```csharp
178
+
SQLitePCLRaw.Startup.Setup();
124
179
```
125
180
181
+
---
182
+
126
183
# Helpful information
127
184
128
185
Read more how to use [EntityFrameworkCore](https://learn.microsoft.com/en-us/ef/ef6/get-started?redirectedfrom=MSDN). My favorite approach is `Code First`.
The `EFCoreSQLiteBundle.SQLiteContextFactory` class under the hood executes `SQLitePCLRaw.Startup.Setup();` for proper SQLite setup depends on the current platform.
114
113
115
-
## 3. Create database context
114
+
### 4. Create database context
115
+
116
+
```csharp
117
+
using (vardbContext=newSQLiteContextFactory().CreateDbContext())
Use this option if you well understand how to operate with EFCore on your own.
174
+
175
+
Call the function once at app startup. Important to do that before opening SQLite connection. This method call prepares SQLite.
176
+
177
+
```csharp
178
+
SQLitePCLRaw.Startup.Setup();
124
179
```
125
180
181
+
---
182
+
126
183
# Helpful information
127
184
128
185
Read more how to use [EntityFrameworkCore](https://learn.microsoft.com/en-us/ef/ef6/get-started?redirectedfrom=MSDN). My favorite approach is `Code First`.
0 commit comments