Castle.ActiveRecord.ActiveRecordMediator.FindAll C# (CSharp) Méthode

FindAll() public static méthode

Returns all instances found for the specified type.
public static FindAll ( Type targetType ) : Array
targetType System.Type
Résultat System.Array
		public static Array FindAll(Type targetType)
		{
			return FindAll(targetType, (Order[]) null);
		}

Same methods

ActiveRecordMediator::FindAll ( Type targetType, DetachedCriteria detachedCriteria ) : Array
ActiveRecordMediator::FindAll ( Type targetType, NHibernate.Criterion.Order orders ) : Array

Usage Example

Exemple #1
0
 private static void VerifySchema(ActiveRecordModelCollection models)
 {
     foreach (ActiveRecordModel model in models)
     {
         if (!model.Type.IsAbstract)
         {
             try
             {
                 ActiveRecordMediator.FindAll(model.Type, Expression.Sql("1=0"));
             }
             catch (Exception ex)
             {
                 throw new ActiveRecordException("Error verifying the schema for model " + model.Type.Name, ex);
             }
         }
     }
 }