On Wed, Jan 9, 2013 at 12:31 PM, Aman Sharma <kajubadam25...@gmail.com>wrote:

> Data would be in the form of Entity object. I will create POCO class with
> required properties. Will send this class object into Export to csv class.
>
> --------------------------

Is POCO a List<> without entities or List<> inside?

Guessing that it is a List<> which makes it harder vs. having a DataTable
that can be passed in as a generic type.  Entity objects are tightly typed.

public String POCOcsv( List<Poco> POCO)
{
StringBuilder sb = new StringBuilder();

foreach( Poco p in POCO)
{ // at the row level
// must hard code the entity
sb.Append(p.Name+', ')
sb.Append(p.Comapny+', ')
sb.Append(p.Region+', ')
sb.Append(p.Language+', ')
sb.Append(p.Status+ CRLF())
}

return sb.ToString();

}






-- 
Stephen Russell
Sr. Analyst
Ring Container Technology
Oakland TN

901.246-0159 cell

-- 
You received this message because you are subscribed to the Google
Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML
Web Services,.NET Remoting" group.
To post to this group, send email to dotnetdevelopment@googlegroups.com
To unsubscribe from this group, send email to
dotnetdevelopment+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/dotnetdevelopment?hl=en?hl=en
or visit the group website at http://megasolutions.net

Reply via email to