Skip to content

Commit

Permalink
Merge branch 'feature-dotnet8' of https://github.com/Flexberry/NewPla…
Browse files Browse the repository at this point in the history
…tform.Flexberry.ORM.ODataService into fix-303-repair-mssqlbuild
  • Loading branch information
Anisimova2020 committed Oct 24, 2024
2 parents 108cec3 + 5d2c75a commit 63ac15e
Show file tree
Hide file tree
Showing 9 changed files with 96 additions and 39 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net45;net461;netcoreapp3.1;netstandard2.0;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net45;net461;netcoreapp3.1;netstandard2.0;net6.0;net7.0;net8.0</TargetFrameworks>
<Configurations>Debug;Release</Configurations>
<LangVersion>latest</LangVersion>
<RootNamespace>NewPlatform.Flexberry.ORM.ODataService.Files</RootNamespace>
Expand Down Expand Up @@ -40,7 +40,7 @@
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="2.2.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1' Or '$(TargetFramework)' == 'net6.0' Or '$(TargetFramework)' == 'net7.0' ">
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1' Or '$(TargetFramework)' == 'net6.0' Or '$(TargetFramework)' == 'net7.0' Or '$(TargetFramework)' == 'net8.0'">
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>

Expand Down
15 changes: 15 additions & 0 deletions NewPlatform.Flexberry.ORM.ODataService.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@
<dependency id="NewPlatform.Flexberry.LockService" version="3.0.0" />
<dependency id="NewPlatform.Flexberry.ORM" version="7.2.0" />
<dependency id="Newtonsoft.Json" version="13.0.1" />
</group>
<group targetFramework=".NET8.0">
<dependency id="NewPlatform.Flexberry.AspNetCore.OData" version="7.6.2" />
<dependency id="NewPlatform.Flexberry.LockService" version="3.0.0" />
<dependency id="NewPlatform.Flexberry.ORM" version="7.2.0" />
<dependency id="Newtonsoft.Json" version="13.0.1" />
</group>
</dependencies>
</metadata>
Expand Down Expand Up @@ -111,5 +117,14 @@
<file src="NewPlatform.Flexberry.ORM.ODataServiceCore.Common\bin\$configuration$\net7.0\NewPlatform.Flexberry.ORM.ODataServiceCore.Common.xml" target="lib\net7.0\NewPlatform.Flexberry.ORM.ODataServiceCore.Common.xml" />
<file src="NewPlatform.Flexberry.ORM.ODataServiceCore.WebApi\bin\$configuration$\net7.0\NewPlatform.Flexberry.ORM.ODataServiceCore.WebApi.dll" target="lib\net7.0\NewPlatform.Flexberry.ORM.ODataServiceCore.WebApi.dll" />
<file src="NewPlatform.Flexberry.ORM.ODataServiceCore.WebApi\bin\$configuration$\net7.0\NewPlatform.Flexberry.ORM.ODataServiceCore.WebApi.xml" target="lib\net7.0\NewPlatform.Flexberry.ORM.ODataServiceCore.WebApi.xml" />

<file src="NewPlatform.Flexberry.ORM.ODataService\bin\$configuration$\net8.0\NewPlatform.Flexberry.ORM.ODataService.dll" target="lib\net8.0\NewPlatform.Flexberry.ORM.ODataService.dll" />
<file src="NewPlatform.Flexberry.ORM.ODataService\bin\$configuration$\net8.0\NewPlatform.Flexberry.ORM.ODataService.xml" target="lib\net8.0\NewPlatform.Flexberry.ORM.ODataService.xml" />
<file src="NewPlatform.Flexberry.ORM.ODataService.Files\bin\$configuration$\net8.0\NewPlatform.Flexberry.ORM.ODataService.Files.dll" target="lib\net8.0\NewPlatform.Flexberry.ORM.ODataService.Files.dll" />
<file src="NewPlatform.Flexberry.ORM.ODataService.Files\bin\$configuration$\net8.0\NewPlatform.Flexberry.ORM.ODataService.Files.xml" target="lib\net8.0\NewPlatform.Flexberry.ORM.ODataService.Files.xml" />
<file src="NewPlatform.Flexberry.ORM.ODataServiceCore.Common\bin\$configuration$\net8.0\NewPlatform.Flexberry.ORM.ODataServiceCore.Common.dll" target="lib\net8.0\NewPlatform.Flexberry.ORM.ODataServiceCore.Common.dll" />
<file src="NewPlatform.Flexberry.ORM.ODataServiceCore.Common\bin\$configuration$\net8.0\NewPlatform.Flexberry.ORM.ODataServiceCore.Common.xml" target="lib\net8.0\NewPlatform.Flexberry.ORM.ODataServiceCore.Common.xml" />
<file src="NewPlatform.Flexberry.ORM.ODataServiceCore.WebApi\bin\$configuration$\net8.0\NewPlatform.Flexberry.ORM.ODataServiceCore.WebApi.dll" target="lib\net8.0\NewPlatform.Flexberry.ORM.ODataServiceCore.WebApi.dll" />
<file src="NewPlatform.Flexberry.ORM.ODataServiceCore.WebApi\bin\$configuration$\net8.0\NewPlatform.Flexberry.ORM.ODataServiceCore.WebApi.xml" target="lib\net8.0\NewPlatform.Flexberry.ORM.ODataServiceCore.WebApi.xml" />
</files>
</package>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net45;net461;netcoreapp3.1;netstandard2.0;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net45;net461;netcoreapp3.1;netstandard2.0;net6.0;net7.0;net8.0</TargetFrameworks>
<Configurations>Debug;Release</Configurations>
<LangVersion>latest</LangVersion>
<RootNamespace>NewPlatform.Flexberry.ORM.ODataService</RootNamespace>
Expand All @@ -15,7 +15,7 @@
<FileVersion>1.0.0.0</FileVersion>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1' Or '$(TargetFramework)' == 'net6.0' Or '$(TargetFramework)' == 'net7.0' ">
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1' Or '$(TargetFramework)' == 'net6.0' Or '$(TargetFramework)' == 'net7.0' Or '$(TargetFramework)' == 'net8.0'">
<!-- TODO: remove, fast hack. -->
<DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants>
</PropertyGroup>
Expand Down Expand Up @@ -46,15 +46,15 @@
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' Or '$(TargetFramework)' == 'netcoreapp3.1' Or '$(TargetFramework)' == 'net6.0' Or '$(TargetFramework)' == 'net7.0' ">
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' Or '$(TargetFramework)' == 'netcoreapp3.1' Or '$(TargetFramework)' == 'net6.0' Or '$(TargetFramework)' == 'net7.0' Or '$(TargetFramework)' == 'net8.0'">
<PackageReference Include="NewPlatform.Flexberry.AspNetCore.OData" Version="7.6.2" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\NewPlatform.Flexberry.ORM.ODataService.Files\NewPlatform.Flexberry.ORM.ODataService.Files.csproj" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' Or '$(TargetFramework)' == 'netcoreapp3.1' Or '$(TargetFramework)' == 'net6.0' Or '$(TargetFramework)' == 'net7.0' ">
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' Or '$(TargetFramework)' == 'netcoreapp3.1' Or '$(TargetFramework)' == 'net6.0' Or '$(TargetFramework)' == 'net7.0' Or '$(TargetFramework)' == 'net8.0'">
<ProjectReference Include="..\NewPlatform.Flexberry.ORM.ODataServiceCore.Common\NewPlatform.Flexberry.ORM.ODataServiceCore.Common.csproj" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;netstandard2.0;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;netstandard2.0;net6.0;net7.0;net8.0</TargetFrameworks>
<Configurations>Debug;Release</Configurations>
<LangVersion>latest</LangVersion>
<RootNamespace>NewPlatform.Flexberry.ORM.ODataServiceCore.Common</RootNamespace>
Expand All @@ -15,7 +15,7 @@
<FileVersion>1.0.0.0</FileVersion>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1' Or '$(TargetFramework)' == 'net6.0' Or '$(TargetFramework)' == 'net7.0' ">
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1' Or '$(TargetFramework)' == 'net6.0' Or '$(TargetFramework)' == 'net7.0' Or '$(TargetFramework)' == 'net8.0'">
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;netstandard2.0;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;netstandard2.0;net6.0;net7.0;net8.0</TargetFrameworks>
<Configurations>Debug;Release</Configurations>
<LangVersion>latest</LangVersion>
<RootNamespace>NewPlatform.Flexberry.ORM.ODataService.WebApi</RootNamespace>
Expand All @@ -15,7 +15,7 @@
<FileVersion>1.0.0.0</FileVersion>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1' Or '$(TargetFramework)' == 'net6.0' Or '$(TargetFramework)' == 'net7.0' ">
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1' Or '$(TargetFramework)' == 'net6.0' Or '$(TargetFramework)' == 'net7.0' Or '$(TargetFramework)' == 'net8.0'">
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

### Доработка

Исправление ошибок приветствуется, технические детали можно выяснить в [чате](https://gitter.im/Flexberry/PlatformDevelopment) или непосредственно в описании Issue.
Исправление ошибок приветствуется, технические детали можно выяснить в [чате](https://t.me/flexberry) или непосредственно в описании Issue.
Добавление новой функциональности рекомендуется согласовывать с авторами, поскольку принятие Pool Request в этом случае может быть затруднено.

### Техническая поддержка
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net461;netcoreapp3.1;net7.0</TargetFrameworks>
<TargetFrameworks>net6.0;net461;netcoreapp3.1;net7.0;net8.0</TargetFrameworks>
<Configurations>Debug;Release</Configurations>
<LangVersion>latest</LangVersion>
<RootNamespace>NewPlatform.Flexberry.ORM.ODataService.Tests</RootNamespace>
Expand All @@ -12,6 +12,7 @@
<CodeAnalysisRuleSet>..\..\Flexberry.ruleset</CodeAnalysisRuleSet>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<FileVersion>1.0.0.0</FileVersion>
<EnableUnsafeBinaryFormatterSerialization>true</EnableUnsafeBinaryFormatterSerialization>
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net461' ">
Expand Down Expand Up @@ -57,7 +58,7 @@
<PackageReference Include="Unity.Microsoft.DependencyInjection" Version="5.11.5" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' Or '$(TargetFramework)' == 'net7.0' ">
<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' Or '$(TargetFramework)' == 'net7.0' Or '$(TargetFramework)' == 'net7.0' Or '$(TargetFramework)' == 'net8.0' ">
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="6.0.5" />
</ItemGroup>

Expand Down
78 changes: 52 additions & 26 deletions Tests/NewPlatform.Flexberry.ORM.ODataService.Tests/README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,52 @@
# Integration Tests

## Tests run

Before start test run please fill connection string `ConnectionStringPostgres` in `App.config` like this:

```xml
<add name="ConnectionStringPostgres" connectionString="SERVER=localhost;User ID=postgres;Password=p@ssw0rd;Port=5432;" />
```
Install [Docker](https://docker.com) if it not installed yet and start Docker.

Then start Docker container with PostgreSQL by command from root folder this repository:

```sh
docker-compose up
```

Tests ready to run. Do it now.

When the database is no longer needed for tests, run the command:

```sh
docker-compose down
```

Also perform undo in App.config before commit changes.
# Integration Tests

## Tests run Postgres

Before start test run please fill connection string `ConnectionStringPostgres` in `App.config` like this:

```xml
<add name="ConnectionStringPostgres" connectionString="SERVER=localhost;User ID=postgres;Password=p@ssw0rd;Port=5432;" />
```
Install [Docker](https://docker.com) if it not installed yet and start Docker.

Then start Docker container with PostgreSQL by command from root folder this repository:

```sh
docker-compose up -d
```

Tests ready to run. Do it now.

When the database is no longer needed for tests, run the command:

```sh
docker-compose down
```

Also perform undo in App.config before commit changes.

## Test run MSSQL

Before start test run please fill connection string `ConnectionStringMssql` in `App.config` like this:

```xml
<add name="ConnectionStringMssql" connectionString="SERVER=localhost;User ID=sa;Password=p@ssw0rd;" />
```

Install [Docker](https://docker.com) if it not installed yet and start Docker.

Then start Docker container with Microsoft SQL Server by command from root folder this repository:

```sh
docker-compose -f docker-compose-mssql.yml up -d
```

Tests ready to run. Do it now.

When the database is no longer needed for tests, run the command:

```sh
docker-compose down
```

Also perform undo in App.config before commit changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: '3.2'

services:
mssql:
image: mcr.microsoft.com/mssql/server:2022-latest
environment:
- ACCEPT_EULA=Y
- MSSQL_SA_PASSWORD=p@ssw0rd
ports:
- 1433:1433
volumes:
- mssqldb:/var/opt/mssql

volumes:
mssqldb:

0 comments on commit 63ac15e

Please sign in to comment.