Beispiel #1
0
        public IQueryable <TACGIA> GetCategories()
        {
            var _db = new KTM_WebTM.THONGTIN.tContext();
            IQueryable <TACGIA> query = _db.TACGIAS;

            return(query);
        }
Beispiel #2
0
        public IQueryable <TINTUC> GetBooks([QueryString("id")] int?categoryId)
        {
            var _db = new KTM_WebTM.THONGTIN.tContext();
            IQueryable <TINTUC> query = _db.TINTUCS;

            if (categoryId.HasValue && categoryId > 0)
            {
                query = query.Where(p => p.TGIA_ID == categoryId);
            }
            return(query);
        }