One way of passing these objects would be to send individual properties of these Objects to the database server, one object at a time. Obviously this is highly inefficient. Understanding this, various database management systems have provided various approaches to achieve this.
There are two ways of passing such content to SQL Server –
- Generating an XML from the List and passing it as a parameter
- Creating a Data Table from the List and passing it as a Table Valued Parameter