Example #1
0
        public int AddTestAttribute(tblTestAttribute obj)
        {
            //obj.ID = 18;

            db.tblTestAttributes.Add(obj);
            db.SaveChanges();
            return(obj.ID);
        }
Example #2
0
        public void UpdateTestAttribute(tblTestAttribute obj)
        {
            db.tblTestAttributes.Attach(obj);
            var update = db.Entry(obj);

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

            update.Property(x => x.NormalRange).IsModified = true;
            update.Property(x => x.TestID).IsModified      = true;
            db.SaveChanges();
        }