Skip to content

Commit 207e1e4

Browse files
committed
#143: Add netstandard2.1 support
1 parent 2218045 commit 207e1e4

File tree

3 files changed

+9
-15
lines changed

3 files changed

+9
-15
lines changed

README.md

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -30,29 +30,22 @@ The following features are supported:
3030
- SQL default value (Decorate columns with the `SqlDefaultValueAttribute`, which is part of this library)
3131

3232
## Install
33+
3334
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`).
3435

35-
The project is built to target .NET framework versions 4.0 and 4.5.
36+
The project is built to target .NET framework versions 4.0 and 4.5 and .NET Standard 2.1.
3637
You can use the SQLite CodeFirst in projects that target the following frameworks:
3738

3839
- .NET 4.0 (uses net40)
39-
- .NET 4.5 (uses net45)
40-
- .NET 4.5.1 (uses net45)
41-
- .NET 4.5.2 (uses net45)
42-
- .NET 4.6 (uses net45)
43-
- .NET 4.6.1 (uses net45)
44-
- .NET 4.6.2 (uses net45)
45-
- .NET 4.7 (uses net45)
46-
- .NET 4.7.1 (uses net45)
47-
- .NET 4.7.2 (uses net45)
48-
- .NET 4.8 (uses net45)
40+
- .NET 4.5-4.8 (uses net45)
41+
- .NET Core 3.0-3.1 (uses netstandard2.1)
4942

5043
## How to use
5144

5245
The functionality is exposed by using implementations of the `IDbInitializer<>` interface.
5346
Depending on your need, you can choose from the following initializers:
5447

55-
- SqliteCreateDatabaseIfNotExists
48+
- SqliteCreateDatabaseIfNotExists
5649
- SqliteDropCreateDatabaseAlways
5750
- SqliteDropCreateDatabaseWhenModelChanges
5851

@@ -68,7 +61,7 @@ public class MyDbContext : DbContext
6861
{
6962
public MyDbContext()
7063
: base("ConnectionStringName") { }
71-
64+
7265
protected override void OnModelCreating(DbModelBuilder modelBuilder)
7366
{
7467
var sqliteConnectionInitializer = new SqliteCreateDatabaseIfNotExists<MyDbContext>(modelBuilder);
@@ -130,7 +123,7 @@ public class MyContext : DbContext
130123

131124
The code is written in an extensible way.
132125
The logic is divided into two main parts, Builder and Statement.
133-
The Builder knows how to translate the EdmModel into statements where a statement class creates the SQLite-DDL-Code.
126+
The Builder knows how to translate the EdmModel into statements where a statement class creates the SQLite-DDL-Code.
134127
The structure of the statements is influenced by the [SQLite Language Specification](https://www.sqlite.org/lang.html).
135128
You will find an extensive usage of the composite pattern.
136129

SQLite.CodeFirst.sln

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SQLite.CodeFirst.Test", "SQ
1616
EndProject
1717
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Shared", "Shared", "{1F6D4E0E-5D07-4889-961A-A6AFC0ECD7C7}"
1818
ProjectSection(SolutionItems) = preProject
19+
README.md = README.md
1920
Shared\SQLite.CodeFirst.ruleset = Shared\SQLite.CodeFirst.ruleset
2021
Shared\SQLite.CodeFirst.StrongNameKey.snk = Shared\SQLite.CodeFirst.StrongNameKey.snk
2122
EndProjectSection

SQLite.CodeFirst/SQLite.CodeFirst.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net40;net45</TargetFrameworks>
4+
<TargetFrameworks>net40;net45;netstandard2.1</TargetFrameworks>
55
<Authors>Marc Sallin</Authors>
66
<Company />
77
<Version /> <!-- This empty tag is necessary to make appveyor csproj version patching work! -->

0 commit comments

Comments
 (0)