Skip to content

Commit

Permalink
merge 0.23.0
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm360 committed Jun 15, 2022
2 parents 1e35590 + 779abe9 commit a083ce3
Show file tree
Hide file tree
Showing 126 changed files with 2,323 additions and 1,622 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@ dotnet_diagnostic.CA1040.severity = none # Sometime they are needed

# CA1812: Avoid uninstantiated internal classes
dotnet_diagnostic.CA1812.severity = none # Doing extensive use of dependency injection

# CS1591: Missing XML comment for publicly visible type or member
dotnet_diagnostic.CS1591.severity = none # There are currently too much missing descriptions
18 changes: 5 additions & 13 deletions .github/workflows/myget-unstable-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,12 @@ jobs:
with:
fetch-depth: 0

- name: Setup .NET Core SDK 2.1.x
uses: actions/setup-dotnet@v1
- name: Setup dotnet
uses: actions/setup-dotnet@v2
with:
dotnet-version: '2.1.x'

- name: Setup .NET Core SDK 3.1.x
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.x'

- name: Setup .NET SDK 5.0.x
uses: actions/setup-dotnet@v1
with:
dotnet-version: '5.0.x'
dotnet-version: |
3.1.x
6.0.x
- name: Build with dotnet
run: dotnet build --configuration Release
Expand Down
18 changes: 5 additions & 13 deletions .github/workflows/nuget-stable-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,13 @@ jobs:
- uses: actions/checkout@master
with:
fetch-depth: 0

- name: Setup .NET Core SDK 2.1.x
uses: actions/setup-dotnet@v1
with:
dotnet-version: '2.1.x'

- name: Setup .NET Core SDK 3.1.x
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.x'

- name: Setup .NET SDK 5.0.x
uses: actions/setup-dotnet@v1
- name: Setup dotnet
uses: actions/setup-dotnet@v2
with:
dotnet-version: '5.0.x'
dotnet-version: |
3.1.x
6.0.x
- name: Build with dotnet
run: dotnet build --configuration Release
Expand Down
14 changes: 0 additions & 14 deletions MongODM.sln
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{CF1ABDEA-7
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MongODM.Hangfire", "src\MongODM.Hangfire\MongODM.Hangfire.csproj", "{10897D0D-4898-4A4D-8D1E-B2435E93D9A1}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ExecutionContext", "src\ExecutionContext\ExecutionContext.csproj", "{DB6C020D-1C93-4456-8FB5-EF7CF505DF7B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ExecutionContext.Tests", "test\ExecutionContext.Tests\ExecutionContext.Tests.csproj", "{BF4F963A-DBCE-4C53-A209-502F4CAF12C5}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MongODM.AspNetCore", "src\MongODM.AspNetCore\MongODM.AspNetCore.csproj", "{6374F645-5D17-494E-9529-7F83426900B3}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MongODM.Core", "src\MongODM.Core\MongODM.Core.csproj", "{4F2498A9-D60D-4D49-95B9-BC78EE2917B5}"
Expand Down Expand Up @@ -52,14 +48,6 @@ Global
{10897D0D-4898-4A4D-8D1E-B2435E93D9A1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{10897D0D-4898-4A4D-8D1E-B2435E93D9A1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{10897D0D-4898-4A4D-8D1E-B2435E93D9A1}.Release|Any CPU.Build.0 = Release|Any CPU
{DB6C020D-1C93-4456-8FB5-EF7CF505DF7B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DB6C020D-1C93-4456-8FB5-EF7CF505DF7B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DB6C020D-1C93-4456-8FB5-EF7CF505DF7B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DB6C020D-1C93-4456-8FB5-EF7CF505DF7B}.Release|Any CPU.Build.0 = Release|Any CPU
{BF4F963A-DBCE-4C53-A209-502F4CAF12C5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BF4F963A-DBCE-4C53-A209-502F4CAF12C5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BF4F963A-DBCE-4C53-A209-502F4CAF12C5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BF4F963A-DBCE-4C53-A209-502F4CAF12C5}.Release|Any CPU.Build.0 = Release|Any CPU
{6374F645-5D17-494E-9529-7F83426900B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6374F645-5D17-494E-9529-7F83426900B3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6374F645-5D17-494E-9529-7F83426900B3}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down Expand Up @@ -90,8 +78,6 @@ Global
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{10897D0D-4898-4A4D-8D1E-B2435E93D9A1} = {490DAED7-DAD8-459A-A20E-F57F2F6F619E}
{DB6C020D-1C93-4456-8FB5-EF7CF505DF7B} = {490DAED7-DAD8-459A-A20E-F57F2F6F619E}
{BF4F963A-DBCE-4C53-A209-502F4CAF12C5} = {CF1ABDEA-794F-4474-858D-BCB61F367D72}
{6374F645-5D17-494E-9529-7F83426900B3} = {490DAED7-DAD8-459A-A20E-F57F2F6F619E}
{4F2498A9-D60D-4D49-95B9-BC78EE2917B5} = {490DAED7-DAD8-459A-A20E-F57F2F6F619E}
{50D6BEE5-54B5-43F3-BA92-6107AB6E311E} = {CF1ABDEA-794F-4474-858D-BCB61F367D72}
Expand Down
2 changes: 1 addition & 1 deletion samples/AspNetCoreSample/AspNetCoreSample.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>Etherna.MongODM.AspNetCoreSample</RootNamespace>

<Authors>Etherna Sagl</Authors>
Expand Down
2 changes: 1 addition & 1 deletion samples/AspNetCoreSample/Models/ModelMaps/CatMap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class CatMap : IModelMapsCollector
{
public void Register(IDbContext dbContext)
{
dbContext.SchemaRegister.AddModelMapsSchema<Cat>("cd37bafa-a36d-4b1f-815a-deb50c49d030");
dbContext.SchemaRegistry.AddModelMapsSchema<Cat>("cd37bafa-a36d-4b1f-815a-deb50c49d030");
}
}
}
10 changes: 5 additions & 5 deletions samples/AspNetCoreSample/Models/ModelMaps/ModelBaseMap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@
// See the License for the specific language governing permissions and
// limitations under the License.

using Etherna.MongoDB.Bson;
using Etherna.MongoDB.Bson.Serialization.IdGenerators;
using Etherna.MongoDB.Bson.Serialization.Serializers;
using Etherna.MongODM.Core;
using Etherna.MongODM.Core.Serialization;
using MongoDB.Bson;
using MongoDB.Bson.Serialization.IdGenerators;
using MongoDB.Bson.Serialization.Serializers;

namespace Etherna.MongODM.AspNetCoreSample.Models.ModelMaps
{
class ModelBaseMap : IModelMapsCollector
{
public void Register(IDbContext dbContext)
{
dbContext.SchemaRegister.AddModelMapsSchema<ModelBase>("1252861f-82d9-4c72-975e-3571d5e1b6e6");
dbContext.SchemaRegistry.AddModelMapsSchema<ModelBase>("1252861f-82d9-4c72-975e-3571d5e1b6e6");

dbContext.SchemaRegister.AddModelMapsSchema<EntityModelBase<string>>("81dd8b35-a0af-44d9-80b4-ab7ae9844eb5", modelMap =>
dbContext.SchemaRegistry.AddModelMapsSchema<EntityModelBase<string>>("81dd8b35-a0af-44d9-80b4-ab7ae9844eb5", modelMap =>
{
modelMap.AutoMap();

Expand Down
2 changes: 1 addition & 1 deletion samples/AspNetCoreSample/Pages/Index.cshtml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.

using Etherna.MongoDB.Driver;
using Etherna.MongODM.AspNetCoreSample.Models;
using Etherna.MongODM.AspNetCoreSample.Persistence;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using MongoDB.Driver;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
Expand Down
15 changes: 8 additions & 7 deletions samples/AspNetCoreSample/Persistence/SampleDbContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,15 @@
using Etherna.MongODM.AspNetCoreSample.Models;
using Etherna.MongODM.AspNetCoreSample.Models.ModelMaps;
using Etherna.MongODM.Core;
using Etherna.MongODM.Core.Options;
using Etherna.MongODM.Core.Repositories;
using Etherna.MongODM.Core.Serialization;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace Etherna.MongODM.AspNetCoreSample.Persistence
{
public class SampleDbContext : DbContext, ISampleDbContext
{
public SampleDbContext(
IDbDependencies dependencies,
DbContextOptions<SampleDbContext> options)
: base(dependencies, options)
{ }

public ICollectionRepository<Cat, string> Cats { get; } = new CollectionRepository<Cat, string>("cats");

protected override IEnumerable<IModelMapsCollector> ModelMapsCollectors =>
Expand All @@ -38,5 +32,12 @@ public SampleDbContext(
new ModelBaseMap(),
new CatMap()
};

protected override Task SeedAsync()
{
// Seed here.

return base.SeedAsync();
}
}
}
2 changes: 1 addition & 1 deletion samples/AspNetCoreSample/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:57677",
"applicationUrl": "http://localhost:47677",
"sslPort": 44384
}
},
Expand Down
9 changes: 6 additions & 3 deletions samples/AspNetCoreSample/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

using Etherna.MongODM.AspNetCoreSample.Models;
using Etherna.MongODM.AspNetCore.UI;
using Etherna.MongODM.AspNetCoreSample.Persistence;
using Hangfire;
using Microsoft.AspNetCore.Builder;
Expand All @@ -35,7 +35,9 @@ public void ConfigureServices(IServiceCollection services)
{
services.AddRazorPages();

services.AddMongODMWithHangfire<ModelBase>()
services.AddHangfireServer();

services.AddMongODMWithHangfire()
.AddDbContext<ISampleDbContext, SampleDbContext>();

services.AddMongODMAdminDashboard();
Expand All @@ -52,13 +54,14 @@ public void Configure(IApplicationBuilder app)

app.UseAuthorization();

app.UseHangfireServer();
app.UseHangfireDashboard();

app.UseEndpoints(endpoints =>
{
endpoints.MapRazorPages();
});

app.SeedDbContexts();
}
}
}
56 changes: 0 additions & 56 deletions src/ExecutionContext/AsyncLocal/AsyncLocalContext.cs

This file was deleted.

35 changes: 0 additions & 35 deletions src/ExecutionContext/AsyncLocal/AsyncLocalContextHandler.cs

This file was deleted.

32 changes: 0 additions & 32 deletions src/ExecutionContext/AsyncLocal/IAsyncLocalContext.cs

This file was deleted.

Loading

0 comments on commit a083ce3

Please sign in to comment.