reactredux/webapi/WeatherForecast/Models/PageSections/TitleSectionModel.cs

31 lines
925 B
C#

using Core.DomainObjects.PageSections;
using WeatherForecast.Models.Abstractions;
namespace WeatherForecast.Models.PageSections {
public class TitleSectionModel : PageSectionModelBase<TitleSection> {
public ImageModel? Image { get; set; }
public LinkModel? PrimaryLink { get; set; }
public LinkModel? SecondaryLink { get; set; }
public string? PostedOnBy { get; set; }
public TitleSectionModel() { }
public TitleSectionModel(TitleSection titleSection) : base(titleSection) {
//if(titleSection.Image != null)
// Image = new ImageModel(titleSection.Image);
if (titleSection.PrimaryLink != null)
PrimaryLink = new LinkModel(titleSection.PrimaryLink);
if (titleSection.SecondaryLink != null)
PrimaryLink = new LinkModel(titleSection.SecondaryLink);
if (titleSection.PostedOnBy != null)
PostedOnBy = titleSection.PostedOnBy;
}
}
}