58 lines
2.4 KiB
C#
58 lines
2.4 KiB
C#
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");
|
|
}
|
|
}
|
|
}
|