// sản phẩm theo mục
        public ViewResult SanPhamTheoMuc(string MaDanhMuc)
        {
            theloaisp theloai = db.theloaisps.SingleOrDefault(n => n.theloai_id == MaDanhMuc);

            if (theloai == null)
            {
                ViewBag.danhmuc = "Đang cập nhật";
                return(null);
            }
            else
            {
                return(View(db.sanphams.Where(n => n.theloai_id == MaDanhMuc).ToList()));
            }
        }
        public theloaisp FindEntity(string theloai_id)
        {
            theloaisp theloai = db.theloaisps.Find(theloai_id);

            return(theloai);
        }