예제 #1
0
 public static ChargeStation AsEntityExtended(this ChargeStationDocument document, ChargeGroup chargeGroup)
 => new ChargeStation(new Guid(document.Id), document.Name, chargeGroup)
 {
     Connectors = document.Connectors.Select(c =>
                                             new Connector(c.Id, c.MaxCurrentAmps, new Guid(c.ParentChargeStationId)))
 };
예제 #2
0
 public static ChargeStation AsEntity(this ChargeStationDocument document)
 => new ChargeStation(new Guid(document.Id), document.Name, null)
 {
     Connectors = document.Connectors.Select(c =>
                                             new Connector(c.Id, c.MaxCurrentAmps, new Guid(c.ParentChargeStationId)))
 };