public void AddProductTest(ArchivedProductTestW aproductTest) { aproductTest.Id = Guid.NewGuid(); db.ArchivedProductTests.Add(aproductTest.ToBase()); db.SaveChanges(); }
public void EditProductTest(ArchivedProductTestW aproductTest) { var productTest = db.ArchivedProductTests.Single(pt => pt.Id == aproductTest.Id); productTest.ArchivedProductId = aproductTest.ArchivedProductId; productTest.TestCategory = aproductTest.TestCategory; productTest.TestMethods = aproductTest.TestMethods; productTest.TestName = aproductTest.TestName; productTest.TestTemperature = aproductTest.TestTemperature; productTest.TestUnitName = aproductTest.TestUnitName; productTest.TestAcredetationLevel = aproductTest.TestAcredetationLevel; productTest.TestType = aproductTest.TestType; productTest.TestTypeShortName = aproductTest.TestTypeShortName; productTest.MethodValue = aproductTest.MethodValue; productTest.Remark = aproductTest.Remark; db.SaveChanges(); }