Skip to content

Commit

Permalink
Version 6.0.0-preview001
Browse files Browse the repository at this point in the history
  • Loading branch information
JonPSmith committed Oct 30, 2021
1 parent ff2433b commit efce482
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 20 deletions.
2 changes: 1 addition & 1 deletion Benchmarking/PerfCallMethodToUpdate1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public void AddReviewToBook()
[GlobalSetup]
public void Setup()
{
_options = SqliteInMemory.CreateOptions<EfCoreContext>();
_options = SqliteHelper.GetSqliteInMemoryOptions();
using (var context = new EfCoreContext(_options))
{
context.Database.EnsureCreated();
Expand Down
2 changes: 1 addition & 1 deletion Benchmarking/PerfCallMethodUpdate2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public void ChangePublicationDate()
[GlobalSetup]
public void Setup()
{
_options = SqliteInMemory.CreateOptions<EfCoreContext>();
_options = SqliteHelper.GetSqliteInMemoryOptions();
using (var context = new EfCoreContext(_options))
{
context.Database.EnsureCreated();
Expand Down
22 changes: 22 additions & 0 deletions Benchmarking/SqliteHelper.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using DataLayer.EfCode;
using Microsoft.Data.Sqlite;
using Microsoft.EntityFrameworkCore;


namespace Benchmarking
{
internal static class SqliteHelper
{
public static DbContextOptions<EfCoreContext> GetSqliteInMemoryOptions()
{
var connectionStringBuilder = new SqliteConnectionStringBuilder { DataSource = ":memory:" };
var connectionString = connectionStringBuilder.ToString();
var connection = new SqliteConnection(connectionString);
connection.Open();

var builder = new DbContextOptionsBuilder<EfCoreContext>();
builder.UseSqlite(connection);
return builder.Options;
}
}
}
17 changes: 7 additions & 10 deletions GenericServices/GenericServices.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@

<PropertyGroup>
<TargetFrameworks>net6.0</TargetFrameworks>
</PropertyGroup>

<PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>

<ItemGroup>
Expand All @@ -17,10 +14,10 @@

<PropertyGroup>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageVersion>5.0.1</PackageVersion>
<Version>5.0.1</Version>
<AssemblyVersion>5.0.1.0</AssemblyVersion>
<FileVersion>5.0.1.0</FileVersion>
<PackageVersion>6.0.0-preview001</PackageVersion>
<Version>6.0.0</Version>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<FileVersion>6.0.0.0</FileVersion>
<Company>Selective Analytics</Company>
<Authors>Jon P Smith</Authors>
<PackageId>EfCore.GenericServices</PackageId>
Expand All @@ -32,8 +29,8 @@
<RepositoryType>GuHub</RepositoryType>
<PackageTags>Entity Framework Core, ASP.NET Core</PackageTags>
<PackageReleaseNotes>
- Added the documentaion file to the NuGet package
</PackageReleaseNotes>
Updated to .NET 6.0 preview RC.2
</PackageReleaseNotes>
<PackageIcon>GenericServicesNuGetIcon128.png</PackageIcon>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
</PropertyGroup>
Expand Down
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@

This library helps you quickly code Create, Read, Update and Delete (CRUD) accesses for a web/mobile/desktop application. It acts as a adapter and command pattern between a database accessed by Entity Framework Core (EF Core) and the needs of the front-end system.

**NOTE:** *The first number in the version number of this library defines what version of EF Core it works for. e.g. EfCore.GenericServices version 5 is works with to EF Core 5. If are using the older versions of EF Core you should use [EfCore.GenericServices, version 3.2.2](https://www.nuget.org/packages/EfCore.GenericServices/3.2.2).*
**NOTE:** The first number in the version number of this library defines what version of EF Core it works for. e.g.

If you have an idea for a pull request, then I recommend you first contact me via an issue containing the reason/idea. I get some pull requests for features that the library can already do.
- EfCore.GenericServices version 5 is works with to EF Core 5.
- EfCore.GenericServices version 6 is works with to EF Core 6... and so on.

_If are using the older versions of EF Core you should use [EfCore.GenericServices, version 3.2.2](https://www.nuget.org/packages/EfCore.GenericServices/3.2.2)._

The EfCore.GenericServices library is available on [NuGet as EfCore.GenericServices](https://www.nuget.org/packages/EfCore.GenericServices/) and is an open-source library under the MIT licence. See [ReleaseNotes](https://github.com/JonPSmith/EfCore.GenericServices/blob/master/ReleaseNotes.md) for details of changes and information on versions before EF Core 5.

Expand All @@ -15,9 +18,8 @@ The EfCore.GenericServices library is available on [NuGet as EfCore.GenericServi
The documentaion can be found in the [GitHub wiki](https://github.com/JonPSmith/EfCore.GenericServices/wiki). but the rest of this README file provides a good overview of what the library can do, but here are some articles that give you a detailed description of what the libraray does.

* [GenericServices: A library to provide CRUD front-end services from a EF Core database](https://www.thereformedprogrammer.net/genericservices-a-library-to-provide-crud-front-end-services-from-a-ef-core-database/).
* [Improving Domain-Driven Design updates in EfCore.GenericServices](https://www.thereformedprogrammer.net/improving-domain-driven-design-updates-in-efcore-genericservices/).
* [Improving Domain-Driven Design updates in EfCore.GenericServices](https://www.thereformedprogrammer.net/improving-domain-driven-design-updates-in-efcore-genericservices/) - version 3.1.0 and above.
* [GenericServices Design Philosophy + tips and techniques](https://www.thereformedprogrammer.net/genericservices-design-philosophy-tips-and-techniques/).
* [Improving Domain-Driven Design updates in EfCore.GenericServices](https://www.thereformedprogrammer.net/improving-domain-driven-design-updates-in-efcore-genericservices/) - version 3.1.0 and above


## What the library does
Expand All @@ -37,7 +39,7 @@ So, you create one set of update code for your specific application and then cut
I personally work with ASP.NET Core, so my examples are from that, but it will work with any NET Core type of application
*(I do know one person have used this libary with WPF).*

## Limitations with EF Core 5
## Limitations with EF Core 5 and beyond

- The `ILinkToEntity<TEntity>` interface can't handle an entity class mapped to a multple tables.

Expand Down
4 changes: 2 additions & 2 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Release Notes

## TODO
## 6.0.0-preview

- Nothing at the moment
- Updated to .NET 6.0 preview RC.2

## 5.0.1

Expand Down
2 changes: 1 addition & 1 deletion Tests/UnitTests/DataLayer/TestQueryDb.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public TestQueryDb(ITestOutputHelper output)
public void TestDbQueryChildReadOnlyOk()
{
//SETUP
var options = SqliteInMemory.CreateOptionsWithLogging<TestDbContext>(log => _output.WriteLine(log.ToString()));
var options = SqliteInMemory.CreateOptionsWithLogTo<TestDbContext>(log => _output.WriteLine(log.ToString()));
using (var context = new TestDbContext(options))
{
context.Database.EnsureCreated();
Expand Down

0 comments on commit efce482

Please sign in to comment.