public static ConverterOutputClientModel ToOutputClientModel(this ConverterIoEntity entity)
 {
     return(new ConverterOutputClientModel
     {
         Id = GuidConverter.EncodeGuid(entity.Id),
         UnitSymbol = entity.Unit.Symbol
     });
 }
Пример #2
0
 public static ConverterListClientModel ToClientModel(this ConverterListEntity entity)
 {
     return(new ConverterListClientModel
     {
         Id = GuidConverter.EncodeGuid(entity.Id),
         DisplayName = entity.DisplayName,
         Converters = entity.Converters.ToClientModels()
     });
 }
 public static ConverterClientModel ToClientModel(this ConverterEntity entity)
 {
     return(new ConverterClientModel
     {
         Id = GuidConverter.EncodeGuid(entity.Id),
         UnitTypeId = entity.UnitTypeId,
         Input = entity.Input.ToInputClientModel(),
         Outputs = entity.Outputs.ToOutputClientModels()
     });
 }