Skip to content

Commit a75917e

Browse files
author
Marc Sallin
committed
Merge pull request #26 from gchernis/patch-1
Update README.md: Cleaned up syntax for clarity and readability
2 parents 9d168d5 + 3a48b0e commit a75917e

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
Creates a [SQLite Database](https://sqlite.org/) from Code, using [Entity Framework](https://msdn.microsoft.com/en-us/data/ef.aspx) CodeFirst.
77

8-
This Project ships several `IDbInitializer` which creates a new SQLite Database, based on your model/code.
8+
This Project ships several `IDbInitializer` classes. These create new SQLite Databases based on your model/code.
99
I started with the [code](https://gist.github.com/flaub/1968486e1b3f2b9fddaf) from [flaub](https://github.com/flaub).
1010

1111
Currently the following is supported:
@@ -18,23 +18,23 @@ Currently the following is supported:
1818
- Index (Decorate columns with the `Index` attribute. Indices are automatically created for foreign keys by default. To prevent this you can remove the convetion `ForeignKeyIndexConvention`)
1919

2020
I tried to write the code in a extensible way.
21-
The logic is divided into two main parts. Builder and Statement.
21+
The logic is divided into two main parts, Builder and Statement.
2222
The Builder knows how to translate the EdmModel into statements where a statement class creates the SQLite-DDL-Code.
2323
The structure of the statements is influenced by the [SQLite Language Specification](https://www.sqlite.org/lang.html).
2424
You will find an extensive usage of the composite pattern.
2525

2626
## Install
2727
Either get the assembly from the latest [GitHub Release Page](https://github.com/msallin/SQLiteCodeFirst/releases) or install the NuGet-Package [SQLite.CodeFirst](https://www.nuget.org/packages/SQLite.CodeFirst/) (`PM> Install-Package SQLite.CodeFirst`).
2828

29-
The project is builded for the target frameworks 4.0 and 4.5.
30-
That means you can use the SQLite CodeFirst in projects with the following target frameworks.
29+
The project is built to target.NET framework versions 4.0 and 4.5.
30+
You can use the SQLite CodeFirst in projects that target the following frameworks:
3131
- .NET 4.0 (use net40)
3232
- .NET 4.5 (use net45)
3333
- .NET 4.5.1 (use net45)
3434
- .NET 4.5.2 (use net45)
3535

3636
## How to use
37-
If you want to let the Entity Framework create the database, if it does not exist, just set `SqliteDropCreateDatabaseAlways<>` or `SqliteCreateDatabaseIfNotExists<>` as your `IDbInitializer<>`.
37+
When you want to let the Entity Framework create database if it does not exist, just set `SqliteDropCreateDatabaseAlways<>` or `SqliteCreateDatabaseIfNotExists<>` as your `IDbInitializer<>`.
3838
```csharp
3939
public class MyDbContext : DbContext
4040
{
@@ -50,9 +50,9 @@ public class MyDbContext : DbContext
5050
}
5151
```
5252

53-
In a more advanced scenario you may want to populate some core- or test-data after the database was created.
53+
In a more advanced scenario, you may want to populate some core- or test-data after the database was created.
5454
To do this, inherit from `SqliteDropCreateDatabaseAlways<>` or `SqliteCreateDatabaseIfNotExists<>` and override the `Seed(MyDbContext context)` function.
55-
This function will be called, in a own transaction, right after the database was created. This function is only executed if a new database was successfully created.
55+
This function will be called in a transaction once the database was created. This function is only executed if a new database was successfully created.
5656
```csharp
5757
public class MyDbContextContextInitializer : SqliteDropCreateDatabaseAlways<MyDbContext>
5858
{
@@ -67,5 +67,5 @@ public class MyDbContextContextInitializer : SqliteDropCreateDatabaseAlways<MyDb
6767
```
6868

6969
## Hints
70-
If you try to reinstall the NuGet-Packages (e.g. if you want to downgrade to .NET 4.0) the app.config will be overwritten and you may getting an exception when you try to run the console project.
70+
If you try to reinstall the NuGet-Packages (e.g. if you want to downgrade to .NET 4.0), the app.config will be overwritten and you may getting an exception when you try to run the console project.
7171
In this case please check the following issue: https://github.com/msallin/SQLiteCodeFirst/issues/13.

0 commit comments

Comments
 (0)