private static void Save <TModel>(IEnumerable <TModel> models, string nameOfModelCollection) { XmlDataAccess.Save(models.ToArray(), RoomForRentXmlConfig.GetFilePath(nameOfModelCollection)); SetRelationalProperties(); }
// ReSharper disable once RedundantAssignment private static void Load <TModel>(ref IList <TModel> models, string nameOfModelCollection) { var loadResult = XmlDataAccess.Load <TModel[]>(RoomForRentXmlConfig.GetFilePath(nameOfModelCollection)); models = loadResult?.ToList() ?? new List <TModel>(); }