public XmlElement ToXmlElement(XmlHelper helper) { var xmlElement = helper.CreateElement(nameof(MonthYearPeriodModel).Replace("Model", string.Empty)); xmlElement.AppendChild(helper.CreateElement(nameof(DateFrom), DateFrom.ToXmlElement(helper))); xmlElement.AppendChild(helper.CreateElement(nameof(DateTo), DateTo.ToXmlElement(helper))); return(xmlElement); }