Exemple #1
0
 public virtual ActionResult Index(AddTextModel model)
 {
     using (var db = new TextSentimentDbContext())
     {
         db.TextAnalyses.Add(new TextAnalysis()
         {
             Title       = model.Title,
             TextContent = model.Text
         });
         db.SaveChanges();
     }
     return(RedirectToAction(MVC.Home.Index()));
 }
Exemple #2
0
        // GET: Text
        public virtual ActionResult Index()
        {
            var model = new AddTextModel();

            return(View(model));
        }