zeroframework/Services/DeviceCenter/ZeroFramework.DeviceCenter.Application/AutoMapper/DevicesProfile.cs

24 lines
791 B
C#
Raw Normal View History

2023-12-05 09:22:48 +00:00
using AutoMapper;
using ZeroFramework.DeviceCenter.Application.Models.Devices;
using ZeroFramework.DeviceCenter.Domain.Aggregates.DeviceAggregate;
namespace ZeroFramework.DeviceCenter.Application.AutoMapper
{
public class DevicesProfile : Profile
{
public DevicesProfile()
{
AllowNullDestinationValues = true;
AllowNullCollections = true;
CreateMap<Device, DeviceGetResponseModel>();
CreateMap<DeviceCreateRequestModel, Device>();
CreateMap<DeviceUpdateRequestModel, Device>();
CreateMap<DeviceGroup, DeviceGroupGetResponseModel>();
CreateMap<DeviceGroupCreateRequestModel, DeviceGroup>();
CreateMap<DeviceGroupUpdateRequestModel, DeviceGroup>();
}
}
}