コード例 #1
0
 public static CurrentEntity ToCurrentEntity2(this Current current, InstallationEntity installationEntity) =>
 current.Pipe(it =>
              new CurrentEntity(it.fromDateTime, it.tillDateTime,
                                it.values.Select(ToValueEntity).ToList(),
                                it.standards.Select(ToStandardEntity).ToList(),
                                it.indexes.Select(ToIndexEntity).ToList())).Pipe(entity =>
 {
     entity.InstallationEntity = installationEntity;
     return(entity);
 });
コード例 #2
0
 public static Installation ToInstallation(this InstallationEntity installationEntity) =>
 installationEntity.Pipe(it =>
                         new Installation(it.Id, JsonConvert.DeserializeObject <Location>(it.Location),
                                          JsonConvert.DeserializeObject <Address>(it.Address)));