public bool InkPen(Pen pen, Ink ink) { Entities.Pen penEntity = DtoToEntityConverter.Convert(pen); Entities.Ink inkEntity = DtoToEntityConverter.Convert(ink); penEntity.InkUp(inkEntity); pen = EntityToDtoConverter.Convert(penEntity); return(Storage.UpdatePen(pen)); }
public static Pen Convert(Entities.Pen penEntity) { Pen useCasePen = new Pen() { Id = penEntity.Id, Manufacturer = penEntity.Manufacturer, Model = penEntity.Model, Ink = Convert(penEntity.Ink) }; return(useCasePen); }
public static Entities.Pen Convert(Pen pen) { Entities.Pen penEntity = new Entities.Pen() { Id = pen.Id, Manufacturer = pen.Manufacturer, Model = pen.Model }; if (pen.Ink != null) { penEntity.Ink = Convert(pen.Ink); } return(penEntity); }