public static TrackViewModel CreateNew(TrackTypeViewModel trackTypeViewModel) { TrackCrossing trackCrossing = new TrackCrossing { Article = string.Empty, CrossingType = TrackCrossingType.Simple, LengthId = trackTypeViewModel.Lengths.First().Id, LengthBId = trackTypeViewModel.Lengths.First().Id, CrossingAngleId = trackTypeViewModel.Angles.First().Id }; return(new TrackCrossingViewModel(trackTypeViewModel, trackCrossing)); }
public TrackCrossingViewModel(TrackTypeViewModel trackTypeViewModel, TrackCrossing track) : base(trackTypeViewModel, track) { this.track = track; }