Exemplo n.º 1
0
 /// <summary>
 /// Equality is based on all public properties including deep equality of composed objects.
 /// </summary>
 /// <param name="column">column to be compared with this object</param>
 /// <returns></returns>
 public virtual bool EqualsFully(Column column)
 {
     if (!Equals(column)) return false;
     return (Id == column.Id
             && Name == column.Name
             && SystemType.Equals(column.SystemType)
             && UserType.Equals(column.UserType)
             && MaxLength == column.MaxLength
             && Precision == column.Precision
             && Scale == column.Scale
             && Collation == column.Collation
             && IsNullable == column.IsNullable
             && IsAnsiPadded == column.IsAnsiPadded
             && IsRowGuidCol == column.IsRowGuidCol
             && IsIdentity == column.IsIdentity
             && IsComputed == column.IsComputed
             && IsFileStream == column.IsFileStream
             && IsReplicated == column.IsReplicated
             && IsNonSqlSubscribed == column.IsNonSqlSubscribed
             && IsMergePublished == column.IsMergePublished
             && IsDtsReplicated == column.IsDtsReplicated
             && IsXmlDocument == column.IsXmlDocument
             && XmlCollectionId == column.XmlCollectionId
             && Default == column.Default
             && Rule == column.Rule
             && ParentObject.Equals(column.ParentObject)
            );
 }
Exemplo n.º 2
0
 public void FixtureSetUp()
 {
     using (var session = SessionFactory.OpenSession())
     {
         expectedTable = session.CreateCriteria<Table>()
             .Add(Restrictions.Eq("Name", "test_table"))
             .UniqueResult<Table>();
         column = session.CreateCriteria<Column>()
             .Add(Restrictions.Eq("Name", "test"))
             .Add(Restrictions.Eq("ParentObject", expectedTable))
             .UniqueResult<Column>();
         expectedType = TypeMapTestBase.GetTypeByName("varchar", session);
     }
 }