Add project files.

This commit is contained in:
pkus
2025-01-24 13:37:01 +01:00
parent ee70a3c8af
commit ed726eea09
94 changed files with 4591 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\FaKrosnoEfDataModel\FaKrosnoEfDataModel.csproj" />
<ProjectReference Include="..\SytelineSaAppEfDataModel\SytelineSaAppEfDataModel.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,4 @@
using FaKrosnoEfDataModelTests;
Service service = new Service();
await service.Process();

View File

@@ -0,0 +1,57 @@
using FaKrosnoEfDataModel;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using FaKrosnoEfDataModel.Services;
using AutoMapper;
using FaKrosnoEfDataModel.Dtos;
using FaKrosnoEfDataModel.Entities;
using SytelineSaAppEfDataModel;
using SytelineSaAppEfDataModel.Dtos;
using MappingProfile = FaKrosnoEfDataModel.MappingProfile;
using MappingProfileSl = SytelineSaAppEfDataModel.MappingProfile;
namespace FaKrosnoEfDataModelTests
{
internal class Service
{
public async Task Process()
{
Console.WriteLine("Test");
var config = new MapperConfiguration(cfg =>
{
cfg.AddProfile<MappingProfile>();
cfg.AddProfile<MappingProfileSl>();
});
IMapper mapper = config.CreateMapper();
ServiceBase<ScheduleOrderDto> serviceBase =
new ServiceBase<ScheduleOrderDto>(new FaKrosnoDbContext(new DbContextOptions<FaKrosnoDbContext>()), mapper);
IScheduleOrderService scheduleOrderService =
new ScheduleOrderService(new FaKrosnoDbContext(new DbContextOptions<FaKrosnoDbContext>()), mapper);
//var entitiesByLastUpdateDate = scheduleOrderService.GetEntitiesByLastUpdateDate(new DateTime(2024, 11, 12));
//var purchaserDtos = await scheduleOrderService.GetById(15543);
//var byId = await serviceBase.GetById(15543);
SytelineSaAppEfDataModel.Services.EdiCustomerOrderService serviceBase1 =
new SytelineSaAppEfDataModel.Services.EdiCustomerOrderService(new SytelineSaAppDbContext(new DbContextOptions<SytelineSaAppDbContext>()), mapper);
SytelineSaAppEfDataModel.Services.ErrorLogService serviceBase2 =
new SytelineSaAppEfDataModel.Services.ErrorLogService(new SytelineSaAppDbContext(new DbContextOptions<SytelineSaAppDbContext>()), mapper);
//IEnumerable<EdiCustomerOrderDto> task = await serviceBase1.GetByDate(new DateTime(2025, 1, 1));
//EdiCustomerOrderDto ediCustomerOrderDto = await serviceBase1.GetByOrderNumber("EDI0004323");
//var sendOrderToSyteline = serviceBase1.SendOrderToSyteline("EDI0004475");
var byOrderNumber = serviceBase2.GetByOrderNumber("EDI0004490");
}
}
}