/// <summary> /// From FORMDATA To REQUESTDATA /// </summary> /// <param name="authorFormData"></param> /// <returns></returns> public static AreaTranslationRequestData ToRequestData(this AreaTranslationFormData authorFormData) { if (authorFormData == null) { return(new AreaTranslationRequestData()); } return(new AreaTranslationRequestData { AreaTranslationDto = authorFormData.ToItemData(), AreaTranslationDtoList = new List <AreaTranslationItemData>() }); }
/// <summary> /// FROM FROMDATA TO ITEMDATA. /// </summary> /// <param name="formData">the formdata to convert</param> /// <returns>the item data.</returns> public static AreaTranslationItemData ToItemData(this AreaTranslationFormData formData) { if (formData == null) { return(new AreaTranslationItemData()); } AreaTranslationItemData itemData = new AreaTranslationItemData { TranslationId = formData.TranslationId, LanguageId = formData.LanguageId, AreaName = formData.AreaName, AreaId = formData.AreaId }; return(itemData); }