public void CanSaveAndUpdateAssignedSoftware() { var sw = new AssignedSoftware { Key = "AR", Name = "ActiveRecord" }; INhDao<AssignedSoftware> aDao = new NhDao<AssignedSoftware>(context); aDao.Add(sw); conv.Commit(); conv.Restart(); sw.Name = "ActiveRecord vNext"; aDao.Replace(sw); conv.Commit(); int count = 0; conv.Execute(s => count = s.Query<AssignedSoftware>().Where(ar => ar.Name.Contains("vNext")).Count()); Assert.That(count, Is.EqualTo(1)); }
public void CanSaveAssignedSoftware() { var sw = new AssignedSoftware { Key = "AR", Name = "ActiveRecord" }; INhDao<AssignedSoftware> aDao = new NhDao<AssignedSoftware>(context); aDao.Add(sw); conv.Commit(); int count = 0; conv.Execute(s => count = s.Query<AssignedSoftware>().Where(ar => ar.Key == "AR").Count()); Assert.That(count, Is.EqualTo(1)); }