public async Task UpdateAsync(Test test) { if (test is null) throw new ArgumentNullException(nameof(test)); _db.Entry(test).State = EntityState.Modified; _db.Entry<Test>(test).Property(x => x.CreationDate).IsModified = false; await _db.SaveChangesAsync(); }
public async Task UpdateAsync(UserAnswer userAnswer) { if (userAnswer is null) { throw new ArgumentNullException(nameof(userAnswer)); } _db.Entry(userAnswer).State = EntityState.Modified; await _db.SaveChangesAsync(); }
public async Task UpdateAsync(TestMark testMark) { if (testMark is null) { throw new ArgumentNullException(nameof(testMark)); } _db.Entry(testMark).State = EntityState.Modified; await _db.SaveChangesAsync(); }