first commit

This commit is contained in:
motahhari
2025-10-31 20:21:22 +03:30
commit 60d20a2734
186 changed files with 15497 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
using AutoMapper;
namespace GreenHome.Application;
// Mapping profile
public sealed class MappingProfile : Profile
{
public MappingProfile()
{
CreateMap<Domain.Device, DeviceDto>().ReverseMap();
CreateMap<Domain.TelemetryRecord, TelemetryDto>().ReverseMap();
CreateMap<Domain.DeviceSettings, DeviceSettingsDto>()
.ForMember(dest => dest.DeviceName, opt => opt.MapFrom(src => src.Device.DeviceName))
.ReverseMap()
.ForMember(dest => dest.Device, opt => opt.Ignore());
}
}