public HttpResponseMessage GetAllSettings() { List <SettingValueViewModel> settings = new List <SettingValueViewModel>(); settings = _settings.GetAllSettings(); var response = Request.CreateResponse(HttpStatusCode.OK); response.Content = new StringContent(JsonConvert.SerializeObject(settings), System.Text.Encoding.UTF8, "application/json"); return(response); }
public ActionResult ViewSettings() { using (var context = new Uow(this.context)) { var repos = new RepositorySettings(context); var items = repos.GetAllSettings(); return(View(items)); } }
public void RepositorySettingsTests_GetAll_ShouldReturn4Settings() { //Arrange var expected = 4; //Act var actual = repos.GetAllSettings().Count; //Assert Assert.AreEqual(expected, actual); }
private static void InitializeRepos(Uow uow) { _playList.InitializePlaylist(uow); _jukeboxAutoqueue.InitializeJukeBox(uow); var repoSettings = new RepositorySettings(uow); _player.InitializePlayer(); _playList.RefreshPlaylist(); _settings = repoSettings.GetAllSettings(); _jukeboxAutoqueue.RefreshJukeBox(); }