Skip to content

Commit

Permalink
Update to .net core 3.0 preview6, fix ef core version to preview5 unt…
Browse files Browse the repository at this point in the history
…il npgsql is synced - npgsql/efcore.pg#903
  • Loading branch information
SonicGD committed Jun 13, 2019
1 parent f215b81 commit e84af4c
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 16 deletions.
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ steps:
- task: UseDotNet@2
inputs:
packageType: sdk
version: 3.0.100-preview5-011568
version: 3.0.100-preview6-012264
includePreviewVersions: true
- task: DotNetCoreCLI@2
inputs:
Expand Down
3 changes: 0 additions & 3 deletions src/BioEngine.Core.Comments/BioEngine.Core.Comments.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="NEST" Version="6.8.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\BioEngine.Core\BioEngine.Core.csproj" />
</ItemGroup>
Expand Down
3 changes: 0 additions & 3 deletions src/BioEngine.Core.Seo/BioEngine.Core.Seo.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="NEST" Version="6.8.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\BioEngine.Core\BioEngine.Core.csproj" />
</ItemGroup>
Expand Down
3 changes: 0 additions & 3 deletions src/BioEngine.Core.Social/BioEngine.Core.Social.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="NEST" Version="6.8.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\BioEngine.Core\BioEngine.Core.csproj" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/BioEngine.Core.Storage/BioEngine.Core.Storage.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="AWSSDK.S3" Version="3.3.102.12" />
<PackageReference Include="AWSSDK.S3" Version="3.3.102.13" />
<PackageReference Include="SixLabors.ImageSharp" Version="1.0.0-beta0006" />
</ItemGroup>
<ItemGroup>
Expand Down
3 changes: 1 addition & 2 deletions src/BioEngine.Core.Web/BioEngine.Core.Web.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="NEST" Version="6.8.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.0.0-preview5-19227-01" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.0.0-preview6.19307.2" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\BioEngine.Core.Storage\BioEngine.Core.Storage.csproj" />
Expand Down
9 changes: 7 additions & 2 deletions src/BioEngine.Core/BioEngine.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,21 @@
<PackageReference Include="MessageFormat" Version="3.0.1" />
<PackageReference Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="2.9.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="3.0.0-preview5.19227.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="3.0.0-preview5.19227.9" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="3.0.0-preview6.19304.6" />
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="16.0.102" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
<PackageReference Include="Roslynator.Analyzers" Version="2.0.0" />
<PackageReference Include="Roslynator.CodeFixes" Version="2.0.0" />
<PackageReference Include="ReflectionAnalyzers" Version="0.1.20-dev" />
<PackageReference Include="Scrutor" Version="3.0.2" />
<PackageReference Include="System.ComponentModel.Annotations" Version="4.6.0-preview5.19224.8" />
<PackageReference Include="System.ComponentModel.Annotations" Version="4.6.0-preview6.19303.8" />
<!--Fix EF Core on preview5 until npgsql is fixed-->
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.0.0-preview5.19227.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.0.0-preview5.19227.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="3.0.0-preview5.19227.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Abstractions" Version="3.0.0-preview5.19227.1" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="3.0.0-preview5" />
<!---->
<PackageReference Include="FluentValidation" Version="8.4.0" />
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.0.16" />
<PackageReference Include="xunit" Version="2.4.1" />
Expand Down
6 changes: 5 additions & 1 deletion src/BioEngine.Core/DB/BioContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public BioContext(DbContextOptions<BioContext> options) : base(options)
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);
modelBuilder.ForNpgsqlUseIdentityByDefaultColumns();


modelBuilder.RegisterJsonConversion<Menu, List<MenuItem>>(s => s.Items);
modelBuilder.RegisterJsonConversion<StorageItem, StorageItemPictureInfo>(s => s.PictureInfo);
Expand All @@ -46,6 +46,10 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
modelBuilder.RegisterSiteEntityConversions<ContentItem>();
modelBuilder.RegisterSiteEntityConversions<Menu>();
}
else
{
modelBuilder.ForNpgsqlUseIdentityByDefaultColumns();
}

modelBuilder.Entity<Section>().HasIndex(s => s.SiteIds);
modelBuilder.Entity<Section>().HasIndex(s => s.IsPublished);
Expand Down

0 comments on commit e84af4c

Please sign in to comment.