Beispiel #1
0
 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
     });
 }
Beispiel #2
0
        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
            });
        }