I was curious if it is possible to map the staging table through the containing object.
public class Subscriber : IEntity { [Key] public int Id { get; set; } public string Name { get; set; } private ChannelList _subscribedList { get; set; } public int NumSubscribedChannels { get { return _subscribedList.Count(); } } } public class HelpChannel : IEntity { [Key] public int Id { get; set; } public string name { get; set; } public string category { get; set; } public int group { get; set; } }
I need to have a subscribers table, a channel table and an intermediate table in order to associate a subscriber with his / her channels.
Is it possible to map the list that is in the ChannelList object to the subscriber model?
I thought it was probably not possible and that I just need to have a private list for EF to display. But I was not sure that EF would do this for private variables. Will it be?
I hope so, because if it should be publicly available to support encapsulation.
c # asp.net-mvc entity-framework
ProdigousRanger Dec 10 '12 at 19:01 2012-12-10 19:01
source share