Open maxime-aubry opened 7 months ago
Mapper works if i add type on properties.
for example :
import { AutoMap } from '@automapper/classes';
export class TransformationAuditGetAllResponseState {
@AutoMap(() => String)
id!: string;
@AutoMap(() => String)
transformationDate!: string;
}
export class TransformationAuditGetAllResponseDto {
@AutoMap(() => String)
id!: string;
@AutoMap(() => Date)
transformationDate!: Date;
Is there a way to do with another way ?
Is there an existing issue for this?
Describe the issue
After is called the mapper, i get a date as a string, as i wanted. But 'id' property is undefined. I must add 'forMember' function for 'id' property too.
Models/DTOs/VMs
Mapping configuration
Steps to reproduce
No response
Expected behavior
Value of 'id' property of TransformationAuditGetAllResponseDto should be mapped for 'id' property of TransformationAuditGetAllResponseState.
Screenshots
No response
Minimum reproduction code
No response
Package
Other package and its version
No response
AutoMapper version
8.8.1
Additional context
typescript version : 5.3.3