public static MirrorDto ToDto(this IMirror mirror) { var d = new MirrorDto { Id = mirror.Id, Name = mirror.Name, SourceRepository = mirror.SourceRepository.ToDto(), TargetRepository = mirror.TargetRepository.ToDto(), TargetRepositoryRefSpec = mirror.TargetRepositoryRefSpec, Owner = mirror.Owner.ToDto(), CreationTime = mirror.CreationTime, LastSynced = mirror.LastSynced }; return(d); }
public static Mirror ToMirror(this MirrorDto dto) { var m = new Mirror { Id = dto.Id, Name = dto.Name, SourceRepository = dto.SourceRepository.ToSvcRepository(), TargetRepository = dto.TargetRepository.ToSvcRepository(), TargetRepositoryRefSpec = dto.TargetRepositoryRefSpec, Owner = dto.Owner.ToUser(), CreationTime = dto.CreationTime, LastSynced = dto.LastSynced }; return(m); }