static void Main(string[] args) { DataEntityConn context = new DataEntityConn(); Console.WriteLine(context.Chapter.Count()); Console.ReadLine(); }
public ActionResult Index() { SuggestionKeyword keyword = new SuggestionKeyword(); keyword.Keyword = "key"; // keyword.SuggestionKeywordCreateTime = DateTime.Now; keyword.SuggestionKeywordNum = 100; DataEntityConn context = new DataEntityConn(); context.SuggestionKeyword.Add(keyword); context.SaveChanges(); System.Diagnostics.Debug.WriteLine(keyword.Keyword); ViewBag.Title = keyword.Keyword; return(View()); }