0

I'm working on create a SQL Server database table with different column to save the data but in my class definition their is a property List and I'm wondering how to create a column which will capture data from generic list.

Here is my sample class:

public Class CustomerData 
{   
      public long Id {get; set;}   
      public string Title {get; set;}   
      public List<String> Tags {get; set} 
}

I'm not using Code First approach, I'm manually mapping the class properties to table column after creating entity context because my class is part of different library and I don't have access to it.

Any input is helpful.

Guruprasad J Rao
  • 29,410
  • 14
  • 101
  • 200
Kumar
  • 9
  • 2
  • I would create a table with a foreign key for the items in the list because what would happen if the list contained 1000+ entries? – Catwood Jul 21 '15 at 15:15
  • Thanks Guruprasad for formatting my question and providing the valuable input. We're still debating the approach to consider and the following article (http://stackoverflow.com/questions/8317749/entity-framework-code-first-liststring-property-mapping) also provide a good input. – Kumar Aug 04 '15 at 22:24

0 Answers0