public ActionResult Create(ArtworkFormViewModel artworkForm) { //[Bind(Include="Id,Title,Description,Price,Created,ImageUrl")] Artwork artwork = Mapper.Map <ArtworkFormViewModel, Artwork>(artworkForm); if (ModelState.IsValid) { _artworkService.CreateArtwork(artwork); _artworkService.SaveArtwork(); return(RedirectToAction("Index")); } return(View(artwork)); }
//Saves artwork. public async Task SaveArtworkAsync(Artwork artwork) { await _artworkService.SaveArtwork(artwork); await UpdateArtworkListAsync(); }