using Pcm.Db.Entities; namespace Drab.Logic.Dtos; public class TowarDto { public long TowId { get; set; } public string Nazwa { get; set; } public string Kod { get; set; } public string Jm { get; set; } } internal static class TowarExtension { internal static TowarDto ToTowarDto(this Towar towar) { return new TowarDto { TowId = (long)towar.TowId, Nazwa = towar.Nazwa, Kod = towar.Kod, Jm = towar.Jm.Nazwa }; } }