public ViewResult ApplicationSamples() { ShowcaseViewModel model = ViewModelFactory.CreateShowcaseViewModel(this.PathHelper, this.TableOfContentsRepository, this.ApplicationSamplesRepository, this.ControlRepository, this.SampleRepository, MemoryCache.Default); return(View("ApplicationSamples", model)); }
public string ShowcaseLocalInstall() { ShowcaseViewModel model = ViewModelFactory.CreateShowcaseViewModel(this.PathHelper, this.TableOfContentsRepository, this.ApplicationSamplesRepository, this.ControlRepository, this.SampleRepository, MemoryCache.Default); model.LocalZipInstall = true; return(ViewRenderer.RenderView("~/Views/Shared/ApplicationSamples.cshtml", model, ControllerContext)); }
public IActionResult Index(int id) { var model = new ShowcaseViewModel { ViewTitle = "Showcase", Albums = _albumService.GetAll().Where(x => x.IsShowcased && x.UserNum == id).ToList(), Books = _bookService.GetAll().Where(x => x.IsShowcased && x.UserNum == id).ToList(), Games = _gameService.GetAll().Where(x => x.IsShowcased && x.UserNum == id).ToList(), Movies = _movieService.GetAll().Where(x => x.IsShowcased && x.UserNum == id).ToList(), Pops = _popService.GetAll().Where(x => x.IsShowcased && x.UserNum == id).ToList() }; return(View(model)); }
public async Task <ValidationResult> UpdateItemAsync(ShowcaseViewModel showcaseViewModel) { var updateItemCommand = _mapper.Map <UpdateItemCommand>(showcaseViewModel); return(await _meditor.SendCommand(updateItemCommand)); }
public async Task <IActionResult> Put([FromBody] ShowcaseViewModel showcaseViewModel) { return(ModelState.IsValid ? ShowcaseResponse(await _showcaseAppService.UpdateItemAsync(showcaseViewModel)) : ShowcaseResponse(ModelState)); }