public static void LoadTable <T>() where T : class { var path = HttpContext.Current.Server.MapPath(string.Format("~/App_Data/init/{0}.xml", typeof(T).Name)); var xml = System.IO.File.ReadAllText(path); var list = xml.XmlDecode <List <T> >(); BasicWebManager.NewAll(list); }