public ActionResult Create(Artist artist, IEnumerable<Artwork> Artwork = null)
        {
            if (ModelState.IsValid)
            {
                artist.Enabled = true;

                //add artwork if any was uploaded
                var art = (List<ArtworkViewModel>)Session["uploads"];

                var artToAdd = new List<Artwork>();
                if (art != null && art.Count > 0)
                {
                    foreach (var a in art)
                    {
                        artToAdd.Add(a.Artwork);
                    }

                    artist.Artworks = artToAdd;
                }

                //check for image of artist
                var existingBlob = (byte[])Session["uploadedArtistImage"];
                if (existingBlob != null)
                {
                    artist.ArtistPhoto = existingBlob;
                }

                db.Artists.Add(artist);
                db.SaveChanges();

                return RedirectToAction("Index");
            }

            return View(artist);
        }
        public ActionResult Edit(Artist artist)
        {
            if (ModelState.IsValid)
            {

                if (Session["uploadedArtistImage"] != null)
                {
                    artist.ArtistPhoto = (byte[]) Session["uploadedArtistImage"];
                }

                db.Entry(artist).State = EntityState.Modified;
                db.SaveChanges();
                return RedirectToAction("Index");
            }
            return View(artist);
        }