Beispiel #1
0
        public void TestMethod1()
        {
            ClassDal           cd = new ClassDal();
            IQueryable <Class> c  = cd.GetEntities(u => u.C_Id > 0);

            Assert.AreEqual(true, c.Count() > 0);
            Assert.AreEqual(true, true);
        }
        public ActionResult GetAllClassByPro()
        {
            ClassDal           clad = new ClassDal();
            string             pro  = Request["pro"];
            IQueryable <Class> iq   = clad.GetEntities(u => u.Profession.Pro_Name == pro);
            string             str  = "";

            foreach (var item in iq)
            {
                str = str + item.C_Name + "-";
            }
            // string str1 = js.Serialize(iq);
            Response.Write(str);
            Response.End();
            return(View());
        }