forked from sanchezvem/PyroFetes
Merged AutoMapper branch
This commit is contained in:
68
PyroFetes/MappingProfiles/DtoToEntityMappings.cs
Normal file
68
PyroFetes/MappingProfiles/DtoToEntityMappings.cs
Normal file
@@ -0,0 +1,68 @@
|
||||
using AutoMapper;
|
||||
using PyroFetes.DTO.Deliverer.Request;
|
||||
using PyroFetes.DTO.DeliveryNote.Request;
|
||||
using PyroFetes.DTO.Price.Request;
|
||||
using PyroFetes.DTO.Product.Request;
|
||||
using PyroFetes.DTO.ProductDelivery.Request;
|
||||
using PyroFetes.DTO.PurchaseOrder.Request;
|
||||
using PyroFetes.DTO.PurchaseProduct.Request;
|
||||
using PyroFetes.DTO.Quotation.Request;
|
||||
using PyroFetes.DTO.QuotationProduct.Request;
|
||||
using PyroFetes.DTO.SettingDTO.Request;
|
||||
using PyroFetes.DTO.Supplier.Request;
|
||||
using PyroFetes.DTO.User.Request;
|
||||
using PyroFetes.DTO.WareHouseProduct.Request;
|
||||
using PyroFetes.Models;
|
||||
|
||||
namespace PyroFetes.MappingProfiles;
|
||||
|
||||
public class DtoToEntityMappings : Profile
|
||||
{
|
||||
public DtoToEntityMappings()
|
||||
{
|
||||
CreateMap<CreateDelivererDto, Deliverer>();
|
||||
CreateMap<UpdateDelivererDto, Deliverer>();
|
||||
|
||||
CreateMap<CreateDeliveryNoteDto, DeliveryNote>();
|
||||
CreateMap<UpdateDeliveryNoteDto, DeliveryNote>();
|
||||
CreateMap<PatchDeliveryNoteRealDeliveryDateDto, DeliveryNote>();
|
||||
|
||||
CreateMap<CreatePriceDto, Price>();
|
||||
CreateMap<UpdatePriceDto, Price>();
|
||||
CreateMap<PatchPriceSellingPriceDto, Price>();
|
||||
|
||||
CreateMap<CreateProductDto, Product>();
|
||||
CreateMap<UpdateProductDto, Product>();
|
||||
CreateMap<PatchProductMinimalStockDto, Product>();
|
||||
|
||||
CreateMap<CreateProductDeliveryDto, ProductDelivery>();
|
||||
CreateMap<UpdateProductDeliveryDto, ProductDelivery>();
|
||||
|
||||
CreateMap<PatchPurchaseOrderPurchaseConditionsDto,PurchaseOrder>();
|
||||
|
||||
CreateMap<CreatePurchaseProductDto, PurchaseProduct>();
|
||||
CreateMap<UpdatePurchaseProductDto, PurchaseProduct>();
|
||||
CreateMap<PatchPurchaseProductQuantityDto, PurchaseProduct>();
|
||||
|
||||
CreateMap<PatchQuotationConditionsSaleDto, Quotation>();
|
||||
CreateMap<PatchQuotationMessageDto, Quotation>();
|
||||
|
||||
CreateMap<CreateQuotationProductDto, QuotationProduct>();
|
||||
CreateMap<UpdateQuotationProductDto, QuotationProduct>();
|
||||
CreateMap<PatchQuotationProductQuantityDto, QuotationProduct>();
|
||||
|
||||
CreateMap<CreateSettingDto, Setting>();
|
||||
CreateMap<PatchSettingElectronicSignatureDto, Setting>();
|
||||
CreateMap<PatchSettingLogoDto, Setting>();
|
||||
|
||||
CreateMap<CreateSupplierDto, Supplier>();
|
||||
CreateMap<UpdateSupplierDto, Supplier>();
|
||||
CreateMap<PatchSupplierDeliveryDelayDto, Supplier>();
|
||||
|
||||
CreateMap<CreateUserDto, User>();
|
||||
CreateMap<UpdateUserDto, User>();
|
||||
CreateMap<PatchUserPasswordDto, User>();
|
||||
|
||||
CreateMap<PatchWareHouseProductQuantityDto, WarehouseProduct>();
|
||||
}
|
||||
}
|
||||
46
PyroFetes/MappingProfiles/EntityToDtoMappings.cs
Normal file
46
PyroFetes/MappingProfiles/EntityToDtoMappings.cs
Normal file
@@ -0,0 +1,46 @@
|
||||
using AutoMapper;
|
||||
using PyroFetes.DTO.Deliverer.Response;
|
||||
using PyroFetes.DTO.DeliveryNote.Response;
|
||||
using PyroFetes.DTO.Price.Response;
|
||||
using PyroFetes.DTO.Product.Response;
|
||||
using PyroFetes.DTO.ProductDelivery.Response;
|
||||
using PyroFetes.DTO.PurchaseOrder.Response;
|
||||
using PyroFetes.DTO.PurchaseProduct.Response;
|
||||
using PyroFetes.DTO.Quotation.Response;
|
||||
using PyroFetes.DTO.QuotationProduct.Response;
|
||||
using PyroFetes.DTO.SettingDTO.Response;
|
||||
using PyroFetes.DTO.User.Response;
|
||||
using PyroFetes.DTO.WareHouseProduct.Response;
|
||||
using PyroFetes.Models;
|
||||
|
||||
namespace PyroFetes.MappingProfiles;
|
||||
|
||||
public class EntityToDtoMappings : Profile
|
||||
{
|
||||
public EntityToDtoMappings()
|
||||
{
|
||||
CreateMap<Deliverer, GetDelivererDto>();
|
||||
|
||||
CreateMap<DeliveryNote, GetDeliveryNoteDto>();
|
||||
|
||||
CreateMap<Price, GetPriceDto>();
|
||||
|
||||
CreateMap<Product, GetProductDto>();
|
||||
|
||||
CreateMap<ProductDelivery, GetProductDeliveryDto>();
|
||||
|
||||
CreateMap<PurchaseOrder, GetPurchaseOrderDto>();
|
||||
|
||||
CreateMap<PurchaseProduct, GetPurchaseProductDto>();
|
||||
|
||||
CreateMap<Quotation, GetQuotationDto>();
|
||||
|
||||
CreateMap<QuotationProduct, GetQuotationProductDto>();
|
||||
|
||||
CreateMap<Setting, GetSettingDto>();
|
||||
|
||||
CreateMap<User, GetUserDto>();
|
||||
|
||||
CreateMap<WarehouseProduct, GetWareHouseProductDto>();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user