zeroframework/Services/DeviceCenter/ZeroFramework.DeviceCenter.Application/AutoMapper/DevicesProfile.cs
2023-12-05 17:22:48 +08:00

24 lines
791 B
C#

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>();
}
}
}