public void Save(NonPersistentLevel level) { try { int idx = AllLevels.FindIndex(x => x.Lvl.Name.Equals(level.Lvl.Name)); if (idx >= 0) AllLevels[idx] = level; FileHelper fWriter = new FileHelper(); fWriter.WriteAsXml<Level>(AllLevels.Select(x => x.Lvl).ToList(), Conf.GetSetting<string>("LevelFile")); } catch (Exception e) { throw ThrowWCFException(e, 500); } }