public static SalesOrderModel ConverToModel(SalesOrderHeader so) { PrimitiveCloner cloner = new PrimitiveCloner(typeof(SalesOrderHeader), typeof(SalesOrderModel)); SalesOrderModel model = new SalesOrderModel(); cloner.Clone(so, model); return(model); }
public static void ApplyFromModel(SalesOrderHeader so, SalesOrderModel model) { PrimitiveCloner cloner = new PrimitiveCloner(typeof(SalesOrderModel), typeof(SalesOrderHeader)); cloner.Clone(model, so); }