public ActionResult Create(Topic topic, HttpPostedFileBase ImageFile)
        {
            byte[] image;
            using (var ms = new MemoryStream())
            {
                ImageFile.InputStream.CopyTo(ms);
                image = ms.ToArray();
            }
            if (ModelState.IsValid)
            {
                db.Topics.Add(topic);
                db.Images.Add(new Images() { Image = image, TopicID = topic.TopicID});
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(topic);
        }
 public ActionResult Edit(Topic topic)
 {
     if (ModelState.IsValid)
     {
         db.Entry(topic).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(topic);
 }