Similar question: Mapping collection of strings with Entity Framework or Linq to SQL
I have a role class:
public class Role
{
public int RoleID { get; set; }
public virtual IList<string> Actions { get; set; }
}
I have a mapping table in the db, "RoleActionMapping" with the columns, "RoleID" and "Action". "RoleID" is a foreign key point to the Role table, and "Action" is a varchar. I cannot seem to setup my EF mapping to populate the Role class with the RoleActions.
Any ideas on how to achieve this? Thanks!