/// <summary> /// Create from service model /// </summary> /// <param name="model"></param> public HistoricEventApiModel(HistoricEventModel model) { if (model == null) { throw new ArgumentNullException(nameof(model)); } EventFields = model.EventFields; }
/// <summary> /// Create from service model /// </summary> /// <param name="model"></param> public static HistoricEventApiModel ToApiModel( this HistoricEventModel model) { if (model == null) { return(null); } return(new HistoricEventApiModel { EventFields = model.EventFields }); }