DRAB/Drab.Logic/Dtos/MagDto.cs
2025-07-11 10:50:46 +02:00

21 lines
442 B
C#

namespace Drab.Logic.Dtos;
public class MagDto
{
public long MagId { get; set; }
public string Nazwa { get; set; }
public short Numer { get; set; }
}
internal static class MagazynExtensions
{
internal static MagDto ToMagDto(this Magazyn magazyn)
{
return new MagDto
{
MagId = (long)magazyn.MagId,
Numer = magazyn.Numer ?? 0,
Nazwa = magazyn.Nazwa
};
}
}