Compare commits

...

3 Commits

Author SHA1 Message Date
a794921f82 create DatabaseImplement project 2024-04-17 17:38:54 +04:00
dc723db6b3 create BusinessLogic project 2024-04-17 17:32:40 +04:00
571aae534e create Contracts project 2024-04-17 17:31:39 +04:00
5 changed files with 75 additions and 1 deletions

View File

@ -5,7 +5,13 @@ VisualStudioVersion = 17.8.34511.84
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComputerShopRestApi", "ComputerShopRestApi\ComputerShopRestApi.csproj", "{2C36A31D-FD74-4E83-A271-1F300D008E26}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComputerShopDataModels", "ComputerShopDataModels\ComputerShopDataModels.csproj", "{BBCF398B-D800-4D8D-99E8-F7ED2CC14A65}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComputerShopDataModels", "ComputerShopDataModels\ComputerShopDataModels.csproj", "{BBCF398B-D800-4D8D-99E8-F7ED2CC14A65}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComputerShopContracts", "ComputerShopContracts\ComputerShopContracts.csproj", "{B197888D-702B-4122-BFBF-BA6BCB49C0F3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComputerShopBusinessLogic", "ComputerShopBusinessLogic\ComputerShopBusinessLogic.csproj", "{82FCBA71-AC54-45C8-9B21-BCB3DF6E085B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComputerShopDatabaseImplement", "ComputerShopDatabaseImplement\ComputerShopDatabaseImplement.csproj", "{CDE4C963-67B5-47A6-A394-901E95EA40F7}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -21,6 +27,18 @@ Global
{BBCF398B-D800-4D8D-99E8-F7ED2CC14A65}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BBCF398B-D800-4D8D-99E8-F7ED2CC14A65}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BBCF398B-D800-4D8D-99E8-F7ED2CC14A65}.Release|Any CPU.Build.0 = Release|Any CPU
{B197888D-702B-4122-BFBF-BA6BCB49C0F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B197888D-702B-4122-BFBF-BA6BCB49C0F3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B197888D-702B-4122-BFBF-BA6BCB49C0F3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B197888D-702B-4122-BFBF-BA6BCB49C0F3}.Release|Any CPU.Build.0 = Release|Any CPU
{82FCBA71-AC54-45C8-9B21-BCB3DF6E085B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{82FCBA71-AC54-45C8-9B21-BCB3DF6E085B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{82FCBA71-AC54-45C8-9B21-BCB3DF6E085B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{82FCBA71-AC54-45C8-9B21-BCB3DF6E085B}.Release|Any CPU.Build.0 = Release|Any CPU
{CDE4C963-67B5-47A6-A394-901E95EA40F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CDE4C963-67B5-47A6-A394-901E95EA40F7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CDE4C963-67B5-47A6-A394-901E95EA40F7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CDE4C963-67B5-47A6-A394-901E95EA40F7}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,20 @@
using Microsoft.EntityFrameworkCore;
namespace ComputerShopDatabaseImplement
{
public class ComputerShopDatabase : DbContext
{
protected override void OnConfiguring(DbContextOptionsBuilder OptionsBuilder)
{
if (!OptionsBuilder.IsConfigured)
{
OptionsBuilder.UseNpgsql(@"Host=localhost;Database=ComputerShop;Username=postgres;Password=admin");
}
base.OnConfiguring(OptionsBuilder);
AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true);
AppContext.SetSwitch("Npgsql.DisableDateTimeInfinityConversions", true);
}
}
}

View File

@ -0,0 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.18" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.18">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="7.0.11" />
</ItemGroup>
</Project>