Пример #1
0
 public static TalkView FromDomain(Talk talk) => new TalkView(
     talk.Id, CityView.FromDomain(talk.City), SpeakerView.FromDomain(talk.Speaker),
     talk.StartsAt, talk.Status,
     talk.Name, talk.Comment, talk.ShortInfo, talk.FullInfo,
     talk.ApprovedAt.Map(x => (DateTime?)x).ValueOr((DateTime?)null),
     talk.ApprovedBy.Map(AdministratorView.FromDomain).ValueOr((AdministratorView)null),
     talk.PlaceVerifiedAt.Map(x => (DateTime?)x).ValueOr((DateTime?)null),
     talk.PlaceVerifiedBy.Map(AdministratorView.FromDomain).ValueOr((AdministratorView)null),
     talk.Place.Map(PlaceView.FromDomain).ValueOr((PlaceView)null),
     talk.PublishedAt.Map(x => (DateTime?)x).ValueOr((DateTime?)null),
     talk.PublishedBy.Map(AdministratorView.FromDomain).ValueOr((AdministratorView)null),
     talk.ReportedAt.Map(x => (DateTime?)x).ValueOr((DateTime?)null),
     talk.ReportedBy.Map(AdministratorView.FromDomain).ValueOr((AdministratorView)null),
     talk.Report.ValueOr((string)null)
     );
Пример #2
0
 public static PlaceView FromDomain(Place e) => new PlaceView(e.Id, CityView.FromDomain(e.City), e.Name, e.MapUrl, e.HowToGet, e.Address, e.ContactPhone, e.ContactName);
Пример #3
0
 public static SpeakerView FromDomain(Speaker e) => new SpeakerView(e.Id, CityView.FromDomain(e.City), e.Name, e.Photo, e.About, e.Email, e.Facebook, e.Phone);
Пример #4
0
 public static AdministratorView FromDomain(Administrator e) => new AdministratorView(e.Id, CityView.FromDomain(e.City), e.Email, e.Name);