internal static Tailspin.Web.Shared.Models.Survey ToSurvey( this ClientModels.SurveyInformation surveyInformation) { return(new Shared.Models.Survey(surveyInformation.SlugName) { CreatedOn = surveyInformation.CreatedOn, Title = surveyInformation.Title }); }
internal static SurveyModel ToSurveyModel(this ClientModels.SurveyInformation surveyInformation) { if (surveyInformation == null) { throw new ArgumentNullException(nameof(surveyInformation)); } return(new SurveyModel(surveyInformation.SlugName) { CreatedOn = surveyInformation.CreatedOn, Title = surveyInformation.Title }); }