public ActionResult DeleteConfirmed(int id)
        {
            BotHistoryEntity botHistoryEntity = db.BotHistories.Find(id);

            db.BotHistories.Remove(botHistoryEntity);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "Id,Message,Source,UserId,CreateDate")] BotHistoryEntity botHistoryEntity)
 {
     if (ModelState.IsValid)
     {
         db.Entry(botHistoryEntity).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(botHistoryEntity));
 }
        public ActionResult Create([Bind(Include = "Id,Message,Source,UserId,CreateDate")] BotHistoryEntity botHistoryEntity)
        {
            if (ModelState.IsValid)
            {
                db.BotHistories.Add(botHistoryEntity);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(botHistoryEntity));
        }
        // GET: Admin/BotHistoryEntities/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            BotHistoryEntity botHistoryEntity = db.BotHistories.Find(id);

            if (botHistoryEntity == null)
            {
                return(HttpNotFound());
            }
            return(View(botHistoryEntity));
        }