mirror of
https://gitlab.com/Hukuta47/cartrix.git
synced 2026-12-05 04:20:55 +00:00
18 lines
661 B
C#
18 lines
661 B
C#
namespace CartriX.Api.Controllers.Cartridge
|
|
{
|
|
public static class CartridgeMap
|
|
{
|
|
public static Shared.Models.Cartridge.CartridgeItem ToItem(this Entities.Cartridge cartridge) => new()
|
|
{
|
|
Id = cartridge.Id,
|
|
ManufacturerName = cartridge.Model.Manufacturer.Name,
|
|
ModelName = cartridge.Model.Name,
|
|
SupportedArticles = cartridge.Model.SupportedArticles.Select(a => a.Name).ToList(),
|
|
Volume = cartridge.Volume,
|
|
DateLastFilling = cartridge.DateLastFilling,
|
|
CountPrinted = cartridge.CountPrinted,
|
|
StatusId = cartridge.StatusId,
|
|
};
|
|
}
|
|
}
|