first commit
This commit is contained in:
36
Complex.Application/Other/Mapping/MappingProfile.cs
Normal file
36
Complex.Application/Other/Mapping/MappingProfile.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using AutoMapper;
|
||||
using Complex.Application.Basic;
|
||||
using Complex.Application.Complex;
|
||||
using Complex.Application.PersonService;
|
||||
using Complex.Application.Services.Basic;
|
||||
using Complex.Domain.Entities;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace Complex.Mapping;
|
||||
|
||||
public partial class MappingProfile : Profile
|
||||
{
|
||||
public MappingProfile()
|
||||
{
|
||||
//CreateMap<ComplexEntity, ComplexDto>().ReverseMap();
|
||||
//CreateMap<ComplexEntity, ComplexDto>()
|
||||
//.ForMember(m => m.InsertTime, m => m.MapFrom(src => EF.Property<DateTime>(src, "InsertTime")))
|
||||
//.ForMember(m => m.UpdateTime, m => m.MapFrom(src => EF.Property<DateTime?>(src, "UpdateTime")));
|
||||
|
||||
CreateMap<ComplexDto, ComplexEntity>().ReverseMap();
|
||||
|
||||
//.ReverseMap();
|
||||
CreateMap<UnitDto, Unit>().ReverseMap();
|
||||
|
||||
//CreateMap<Unit, UnitDto>()
|
||||
//.ForMember(m => m.InsertTime, m => m.MapFrom(src => EF.Property<DateTime>(src, "InsertTime")))
|
||||
//.ForMember(m => m.UpdateTime, m => m.MapFrom(src => EF.Property<DateTime?>(src, "UpdateTime")));
|
||||
//.ReverseMap();
|
||||
|
||||
CreateMap<UnitStateDto, UnitState>().ReverseMap();
|
||||
|
||||
CreateMap<Person, PersonDto>().ReverseMap();
|
||||
|
||||
CreateMap<CostCycle, CostCycleDto>().ReverseMap();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user