Skip to content

Commit

Permalink
update readme and csproj
Browse files Browse the repository at this point in the history
  • Loading branch information
albx committed Sep 29, 2018
1 parent 82b5d10 commit ce7c268
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 27 deletions.
22 changes: 1 addition & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,12 @@ Nuget package available here
[https://www.nuget.org/packages/Wilcommerce.Core.Data.EFCore](https://www.nuget.org/packages/Wilcommerce.Core.Data.EFCore)

## Usage
Add the CommonContext class to your project.

For example in an ASP.NET Core project add this line to the ConfigureServices method in Startup.cs
```<C#>
services.AddDbContext<CommonContext>(options => // Specify your provider);
```
The CommonContext is injected in the read model component and the Repositoryimplementation.

If you need to persists the events using Entity Framework Core, add the EventsContext class to your project.
Add the the EventsContext class to your project.
```<C#>
services.AddDbContext<EventsContext>(options => // Specify your provider);
```
The EventsContext is injected in the EventStore implementation

## Read model Component
The CommonDatabase class is the Entity Framework Core implementation of the [ICommonDatabase](https://github.com/wilcommerce/Wilcommerce.Core/blob/master/src/Wilcommerce.Core.Common/Domain/ReadModels/ICommonDatabase.cs) interface.

It provides a facade to access all the readonly data.
It requires an instance of CommonContext as constructor parameters.

## Repository Component
The Repository class is the Entity Framework Core implementation of the [IRepository](https://github.com/wilcommerce/Wilcommerce.Core/blob/master/src/Wilcommerce.Core.Common/Domain/Repository/IRepository.cs) interface.

It provides all the methods useful for persist an Aggregate model.
It requires a CommonContext instance as constructor parameter.

## EventStore Component
The EventStore class is the Entity Framework Core implementation of the [IEventStore](https://github.com/wilcommerce/Wilcommerce.Core/blob/master/src/Wilcommerce.Core.Infrastructure/IEventStore.cs) interface.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="2.1.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.7.2" />
<PackageReference Include="Moq" Version="4.8.2" />
<PackageReference Include="xunit" Version="2.3.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="2.1.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.8.0" />
<PackageReference Include="Moq" Version="4.10.0" />
<PackageReference Include="xunit" Version="2.4.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<Version>1.0.0-rc3</Version>
<Version>1.0.0-rc4</Version>
<PackageReleaseNotes></PackageReleaseNotes>
<Authors>Alberto Mori</Authors>
</PropertyGroup>
Expand Down

0 comments on commit ce7c268

Please sign in to comment.