我有一个看起来像这样的DTO:
public class MyThingDto
{
public double Position_X { get; set; }
public double Position_Y { get; set; }
public double Position_Z { get; set; }
public double Speed_X { get; set; }
public double Speed_Y { get; set; }
public double Speed_Z { get; set; }
}
我要映射到一个看起来像这样的对象:
public class MyThing
{
public Vector3D Position {get;set;}
public Vector3D Speed {get;set;}
}
其中Vector3D(显然)看起来像这样:
public class Vector3D
{
public double X {get;set;}
public double Y {get;set;}
public double Z {get;set;}
}
可以使用惯例使用AutoMapper吗?