Free Support Forum - aspose.com

Support for IEnumerable collections

Since the search is down, I’ll just go ahead and post this question. It may have been answered already, but since I can’t search the forums, I don’t know whether it has or not.


I am beginning an evaluation of Aspose Words for our organization. We use Entity Framework 4.1 for our data access. Looking through the docs, it appears that one must pass DataTables or DataSets to the rendering engine.

Does the engine support passing an IEnumerable collection of entities or POCOs, or will we have to create DataTables or DataSets to generate reports from our data?

Thanks

Hello

Thanks for your request. Data can come from a source in a variety of formats supported by ADO.NET. It can be DataTable, DataView, DataSet, IDataReader or an array of values. If you have your data in XML format, then you can load it into a DataSet and merge with the DataSet.

Aspose.Words also accepts ADO Recordset objects and exposes COM classes and interfaces so you can use it from within COM and scripting applications such as ASP applications.

Finally, you can implement the IMailMergeDataSource and sometimes IMailMergeDataSourceRoot interfaces to merge data from any data source including a LINQ query, XML file or business objects.

Best regards,

Thanks, I was able to use the IMailMergeDataSource and it worked great.