常用方法
常用方法
常用方法
常用方法
public void should_Update_Student() { using (var dbContextTransaction = _dbContext.Database.BeginTransaction()) { var student = _studentService.GetDetail(1); student.FirstName = "Updated FirstName"; student.LastName = "Updated Surname"; _studentService.Update(student); Assert.Equal("Updated FirstName", student.FirstName); Assert.Equal("Updated Surname", student.LastName); } }