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

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

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

                    salesCollection.SalesItems = artToAdd;
                }

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

                db.SalesCollections.Add(salesCollection);
                db.SaveChanges();

                return RedirectToAction("Index");
            }

            return View(salesCollection);
        }
        public ActionResult Edit(SalesCollection salesCollection)
        {
            if (ModelState.IsValid)
            {

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

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