示例#1
0
 public virtual bool Equals(MoniData other)
 {
     if (other == null)
     {
         return(false);
     }
     return(this.GetHashCode() == other.GetHashCode());
 }
 public void _07_CanQueryMoniData()
 {
     using (var session = TestDbSessionFactory.OpenSession()) {
         var moniData = new MoniData {
             MoniTime    = DateTime.Now,
             StationId   = 1,
             ItemId      = 1,
             Value       = (decimal)0.003d,
             Description = "test"
         };
         session.Save(moniData);
         session.Flush();
         var query = session.Query <MoniData>();
         var data  = query.ToList();
         Assert.True(data.Count > 0);
         session.Delete(moniData);
         session.Flush();
     }
 }