public void ProcessFile() { XmlDocument XmlDoc = new XmlDocument(); XmlDoc.Load(FilePath); foreach (var Node in XmlDoc.DocumentElement.GetElementsByTagName("AdminUserRole")) { XmlElement Element = (XmlElement)Node; AdminUserRole AdmUserRole = new AdminUserRole(); AdmUserRole.Name = Element.GetElementsByTagName("Name")[0].InnerText; AdmUserRole.Description = Element.GetElementsByTagName("Description")[0].InnerText; AdminUserRoleDAO.Save(AdmUserRole); } }
public static bool Save(AdminUserRole adminUserRole) { return Execute.Save<AdminUserRole>(COLLECTION_NAME, adminUserRole); }