コード例 #1
0
ファイル: TestRepository.cs プロジェクト: anassbb/Coatch
        public void UpdateTestProposéDetached(TestProposé p)
        {
            TestProposé existing = this.DataContext.TestProposés.OfType <TestProposé>().FirstOrDefault(x => x.TestId == p.TestId);

            ((IObjectContextAdapter)DataContext).ObjectContext.Detach(existing);

            this.DataContext.Entry(p).State = EntityState.Modified;
        }
コード例 #2
0
 void ITestService.UpdateTestProposéDetached(TestProposé c)
 {
     utOfWork.TestRepository.UpdateTestProposéDetached(c);
 }
コード例 #3
0
 void ITestService.CreateTestProposé(TestProposé testProposé)
 {
     utOfWork.TestRepository.Add(testProposé);
 }