mirror of
https://gitlab.com/Hukuta47/cartrix.git
synced 2026-12-05 04:20:55 +00:00
24 lines
661 B
C#
24 lines
661 B
C#
using CartriX.Shared.DTOs.Location;
|
|
using CartriX.Shared.Models;
|
|
using Microsoft.Extensions.Options;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Runtime.CompilerServices;
|
|
using System.Text;
|
|
|
|
namespace CartriX.Shared.Mappers
|
|
{
|
|
public static class LocationMap
|
|
{
|
|
public static QueryToListLocationsAndPrintersDto ToQueryToListLocationsAndPrintersDto(this Location location)
|
|
{
|
|
return new()
|
|
{
|
|
id = location.id,
|
|
name = location.name,
|
|
printers = location.printers.Select(p => p.ToQueryPrinterFromLocationDto()).ToList()
|
|
};
|
|
}
|
|
}
|
|
}
|