Exemplo n.º 1
0
        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();
        }
Exemplo n.º 2
0
        public async Task UpdateAsync(UserAnswer userAnswer)
        {
            if (userAnswer is null)
            {
                throw new ArgumentNullException(nameof(userAnswer));
            }

            _db.Entry(userAnswer).State = EntityState.Modified;
            await _db.SaveChangesAsync();
        }
Exemplo n.º 3
0
        public async Task UpdateAsync(TestMark testMark)
        {
            if (testMark is null)
            {
                throw new ArgumentNullException(nameof(testMark));
            }

            _db.Entry(testMark).State = EntityState.Modified;
            await _db.SaveChangesAsync();
        }