public static void Update(this TransferItem target, AbstractEntities.TransferItemUpdate source) { if (source == null || target == null) { return; } target.Discount = source.Discount; target.Name = source.Name; target.Price = source.Price; }
public static TransferItem ToDao(this AbstractEntities.TransferItemUpdate dto) { if (dto == null) { return(null); } return(new TransferItem { Discount = dto.Discount, Name = dto.Name, Price = dto.Price }); }