public static UseCasesShared.DTOs.Ink Convert(Ink ink) { UseCasesShared.DTOs.Ink useCaseInk = new UseCasesShared.DTOs.Ink() { Id = ink.Id.ToString(), Manufacturer = ink.Manufacturer, Colour = ink.Colour }; return(useCaseInk); }
public static Ink Convert(UseCasesShared.DTOs.Ink useCaseInk) { int inkId; int.TryParse(useCaseInk.Id, out inkId); Ink ink = new Ink() { Id = inkId, Manufacturer = useCaseInk.Manufacturer, Colour = useCaseInk.Colour }; return(ink); }