/// <summary> /// From FORMDATA To REQUESTDATA /// </summary> /// <param name="formData"></param> /// <returns></returns> public static PublicationThemeRequestData ToRequestData(this PublicationThemeFormData formData) { if (formData == null) { return(new PublicationThemeRequestData()); } return(new PublicationThemeRequestData { PublicationThemeDto = formData.ToItemData() }); }
/// <summary> /// FROM ITEM DATA TO FORM DATA. /// </summary> /// <param name="itemData">the itemData to convert</param> /// <returns>the formdata result</returns> public static PublicationThemeFormData ToFormData(this PublicationThemeItemData itemData) { if (itemData == null) { return(new PublicationThemeFormData()); } PublicationThemeFormData formData = new PublicationThemeFormData { PublicationThemeId = itemData.PublicationThemeId, PublicationId = itemData.PublicationId, ThemeId = itemData.ThemeId }; return(formData); }