<Project Sdk="Microsoft.NET.Sdk.Web">

  <PropertyGroup>
    <TargetFramework>net9.0</TargetFramework>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
    <IsTestAssetProject>true</IsTestAssetProject>
    <LangVersion>preview</LangVersion>
    <UserSecretsId>38063504-d08c-495a-89c9-daaad2f60f31</UserSecretsId>
  </PropertyGroup>

  <PropertyGroup>
    <DefineConstants Condition=" '$(DatabaseProvider)' == '' or '$(DatabaseProvider)' == 'Npgsql'">$(DefineConstants);NPGSQL</DefineConstants>
    <DefineConstants Condition=" '$(DatabaseProvider)' == 'MySqlConnector' ">$(DefineConstants);MYSQLCONNECTOR</DefineConstants>
  </PropertyGroup>
  
  <ItemGroup>
    <None Include="appsettings.json" CopyToOutputDirectory="PreserveNewest" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="Npgsql" Version="9.0.2" />
    <PackageReference Include="MySqlConnector" Version="2.3.7" />
    <PackageReference Include="Dapper" Version="2.1.35" />
    <PackageReference Include="RazorSlices" Version="0.8.1" />
  </ItemGroup>

  <ItemGroup Condition="$(PublishAot) == 'true'">
    <RuntimeHostConfigurationOption Include="System.Threading.ThreadPool.HillClimbing.Disable" Value="true" />
  </ItemGroup>

</Project>
