예제 #1
0
파일: TestDAL.cs 프로젝트: faisalharoon/HMS
        public int AddTestCategory(tblTestCategory obj)
        {
            //obj.ID = 18;

            db.tblTestCategories.Add(obj);
            db.SaveChanges();
            return(obj.ID);
        }
예제 #2
0
파일: TestDAL.cs 프로젝트: faisalharoon/HMS
        public void UpdateTestCategory(tblTestCategory obj)
        {
            db.tblTestCategories.Attach(obj);
            var update = db.Entry(obj);

            update.Property(x => x.TestCategory).IsModified = true;

            db.SaveChanges();
        }