private static List<Type> GetAggregateTypes(Assembly assemblyWithAggregates)
{
return assemblyWithAggregates.GetExportedTypes().Where(x => x.IsClass && !x.IsAbstract && !x.IsGenericType && x.IsPublic
&& typeof (AggregateRoot).IsAssignableFrom(x)).ToList();
}
}