Example #1
0
 public Test Update(Test test)
 {
     var updatedTest = _dbContext.Tests.Attach(test);
     _dbContext.Entry(test).State = EntityState.Modified;
     _dbContext.SaveChanges();
     return updatedTest;
 }
Example #2
0
 public Test Create(Test test)
 {
     var createdTest = _dbContext.Tests.Add(test);
     _dbContext.SaveChanges();
     return createdTest;
 }