public void CanCustomRepository() { PersistentVariableRepository persistencevariableRepository = new PersistentVariableRepository(); HatCMS.CmsPersistentVariable variable = persistencevariableRepository.FetchbyName("LastPeriodicTaskStartTime_HatCms.Admin.BackgroundTasks.EmailConfigErrors"); Assert.That(variable.Name, Is.EqualTo("LastPeriodicTaskStartTime_HatCms.Admin.BackgroundTasks.EmailConfigErrors")); }
} // SaveToDatabase /// <summary> /// if the name wasn't found, returns a new CmsPersistentVariable object, with the .Name set to String.Empty /// </summary> /// <param name="name"></param> /// <returns></returns> public static CmsPersistentVariable Fetch(string name) { PersistentVariableRepository repository = new PersistentVariableRepository(); return(repository.FetchbyName(name)); } // Fetch