NonInventPurchasingSystem/CPRNIMS.Domain/Profile/Canvass/SupplierRequestProfile.cs
2026-04-21 11:59:21 +08:00

29 lines
888 B
C#

using CPRNIMS.Infrastructure.Dto.Canvass.Request;
using CPRNIMS.Infrastructure.Dto.Canvass.Response;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using AutoMapper;
using CPRNIMS.Infrastructure.ViewModel.Common;
using CPRNIMS.Infrastructure.Entities.Canvass;
namespace CPRNIMS.Domain.Profile.Canvass
{
public class SupplierRequestProfile : AutoMapper.Profile
{
public SupplierRequestProfile()
{
// 1. THIS IS THE MISSING LINK: Request -> Entity
CreateMap<SupplierRequest, Suppliers>();
// 2. Entity -> Response
CreateMap<Suppliers, SupplierResponse>();
// 3. Response <-> Request (Use ReverseMap to handle both directions automatically)
CreateMap<SupplierResponse, SupplierRequest>().ReverseMap();
}
}
}