Ejemplo n.º 1
0
 /// <summary>
 /// Compara dos Synonyms y devuelve true si son iguales, caso contrario, devuelve false.
 /// </summary>
 public static Boolean Compare(Synonym origen, Synonym destino)
 {
     if (destino == null) throw new ArgumentNullException("destino");
     if (origen == null) throw new ArgumentNullException("origen");
     if (!origen.Value.Equals(destino.Value)) return false;
     return true;
 }
Ejemplo n.º 2
0
 public void Fill(Database database, string connectionString)
 {
     if (database.Options.Ignore.FilterSynonyms)
     {
         using (SqlConnection conn = new SqlConnection(connectionString))
         {
             using (SqlCommand command = new SqlCommand(GetSQL(), conn))
             {
                 conn.Open();
                 command.CommandTimeout = 0;
                 using (SqlDataReader reader = command.ExecuteReader())
                 {
                     while (reader.Read())
                     {
                         Synonym item = new Synonym(database) {
                             Id = (int) reader["object_id"],
                             Name = reader["Name"].ToString(),
                             Owner = reader["Owner"].ToString(),
                             Value = reader["base_object_name"].ToString(),
                             CreateDate = (DateTime) reader["create_date"],
                             ModifyDate = (DateTime) reader["modify_date"]
                         };
                         database.Synonyms.Add(item);
                     }
                 }
             }
         }
     }
 }
Ejemplo n.º 3
0
 public override ISchemaBase Clone(ISchemaBase parent)
 {
     Synonym item = new Synonym(parent);
     item.Id = this.Id;
     item.Name = this.Name;
     item.Owner = this.Owner;
     item.Value = this.Value;
     item.Guid = this.Guid;
     return item;
 }
Ejemplo n.º 4
0
        public override ISchemaBase Clone(ISchemaBase parent)
        {
            Synonym item = new Synonym(parent);

            item.Id    = this.Id;
            item.Name  = this.Name;
            item.Owner = this.Owner;
            item.Value = this.Value;
            item.Guid  = this.Guid;
            return(item);
        }
Ejemplo n.º 5
0
 /// <summary>
 /// Compara dos Synonyms y devuelve true si son iguales, caso contrario, devuelve false.
 /// </summary>
 public static Boolean Compare(Synonym origen, Synonym destino)
 {
     if (destino == null)
     {
         throw new ArgumentNullException("destino");
     }
     if (origen == null)
     {
         throw new ArgumentNullException("origen");
     }
     if (!origen.Value.Equals(destino.Value))
     {
         return(false);
     }
     return(true);
 }