public void Delete() { Random random = new Random(); var srcId = random.Next(100); var desc = "插入数据 - " + srcId; var id = SysLogRepository.Insert(TableSource.None, OperationType.Insert, srcId); var log = SysLogRepository.Get(id); Assert.IsNotNull(log); SysLogRepository.Delete(log); log = SysLogRepository.Get(id); Assert.IsNull(log); }
public void Update() { Random random = new Random(); var srcId = random.Next(100); var desc = "插入数据 - " + srcId; var id = SysLogRepository.Insert(TableSource.None, OperationType.Insert, srcId); var log = SysLogRepository.Get(id); var oldTime = log.UpdateTime; var save = SysLogRepository.Update(log); log = SysLogRepository.Get(id); Assert.AreNotEqual(oldTime, log.UpdateTime); }