Beispiel #1
0
        public IActionResult InsertKhoa(Khoa kh)
        {
            int          count;
            StoreContext context = HttpContext.RequestServices.GetService(typeof(firstWeb.Models.StoreContext)) as StoreContext;

            count = context.InsertKhoa(kh);
            if (count > 0)
            {
                ViewData["thongbao"] = "Insert thành công";
            }
            else
            {
                ViewData["thongbao"] = "Insert không thành công";
            }
            return(View());
        }