A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.
3 modified the filter so the edit by @Dominic would be valid in all cases.
source | link

I'm using Tridion 2011 SP1 and having issues getting all Components of a specific schema using the CoreService.

string schemaUri = "tcm:2-10-8"; // My Schema Uri
var filter = new UsingItemsFilterData { ItemTypes = new[] { ItemType.Component } };
XElement componentListElement = client.GetListXml(schemaUri, 
 filter);                                                   new UsingItemsFilterData());   
// This loop will take a LONG time to execute. I have about 4000 components of this type.
foreach (XElement component in componentListElement.Elements())
{
   var data = (ComponentData)client.Read(component.Attribute("ID").Value, 
                                                                  new ReadOptions());
   // do something with data.Content
}

Is there a more efficient way to do this?

I'm using Tridion 2011 SP1 and having issues getting all Components of a specific schema using the CoreService.

string schemaUri = "tcm:2-10-8"; // My Schema Uri
XElement componentListElement = client.GetListXml(schemaUri, 
                                                    new UsingItemsFilterData());
// This loop will take a LONG time to execute. I have about 4000 components of this type.
foreach (XElement component in componentListElement.Elements())
{
   var data = (ComponentData)client.Read(component.Attribute("ID").Value, 
                                                                  new ReadOptions());
   // do something with data.Content
}

Is there a more efficient way to do this?

I'm using Tridion 2011 SP1 and having issues getting all Components of a specific schema using the CoreService.

string schemaUri = "tcm:2-10-8"; // My Schema Uri
var filter = new UsingItemsFilterData { ItemTypes = new[] { ItemType.Component } };
XElement componentListElement = client.GetListXml(schemaUri, filter);                                                       
// This loop will take a LONG time to execute. I have about 4000 components of this type.
foreach (XElement component in componentListElement.Elements())
{
   var data = (ComponentData)client.Read(component.Attribute("ID").Value, 
                                                                  new ReadOptions());
   // do something with data.Content
}

Is there a more efficient way to do this?

2 Reformatting. Changed the type of cast.
source | link

I'm using Tridion 2011 SP1 and having issues getting all Components of a specific schema using the CoreService.

string schemaUri = "tcm:2-10-8"; // My Schema Uri
XElement componentListElement = client.GetListXml(schemaUri, 
                                                   new UsingItemsFilterData());
// This loop will take a LONG time to execute. I have about 4000 components of this type.
foreach (XElement component in componentListElement.Elements())
{
   ComponentDatavar data = (ComponentData)client.Read(component.Attribute("ID").Value, 
                                                                  new ReadOptions()) as ComponentData;;
   // do something with data.Content
}

Is there a more efficient way to do this?

I'm using Tridion 2011 SP1 and having issues getting all Components of a specific schema using the CoreService.

string schemaUri = "tcm:2-10-8"; // My Schema Uri
XElement componentListElement = client.GetListXml(schemaUri, new UsingItemsFilterData());
// This loop will take a LONG time to execute. I have about 4000 components of this type.
foreach (XElement component in componentListElement.Elements())
{
   ComponentData data = client.Read(component.Attribute("ID").Value, new ReadOptions()) as ComponentData;
   // do something with data.Content
}

Is there a more efficient way to do this?

I'm using Tridion 2011 SP1 and having issues getting all Components of a specific schema using the CoreService.

string schemaUri = "tcm:2-10-8"; // My Schema Uri
XElement componentListElement = client.GetListXml(schemaUri, 
                                                   new UsingItemsFilterData());
// This loop will take a LONG time to execute. I have about 4000 components of this type.
foreach (XElement component in componentListElement.Elements())
{
   var data = (ComponentData)client.Read(component.Attribute("ID").Value, 
                                                                  new ReadOptions());
   // do something with data.Content
}

Is there a more efficient way to do this?

    Tweeted twitter.com/#!/StackTridion/status/331828152349380608
1
source | link

What's the fastest way to get all Components content using Core Service?

I'm using Tridion 2011 SP1 and having issues getting all Components of a specific schema using the CoreService.

string schemaUri = "tcm:2-10-8"; // My Schema Uri
XElement componentListElement = client.GetListXml(schemaUri, new UsingItemsFilterData());
// This loop will take a LONG time to execute. I have about 4000 components of this type.
foreach (XElement component in componentListElement.Elements())
{
   ComponentData data = client.Read(component.Attribute("ID").Value, new ReadOptions()) as ComponentData;
   // do something with data.Content
}

Is there a more efficient way to do this?