Hey Guys,
Well this is more of a database relationship modelling question than a nop question,
Am trying to model this scenario
the entities are Customer, Guest, Event
1.) customer registers for events
2.) each customer has guests that he can bring to the event that he's registered for
(eg if he has registered to event 1 and quantity is 3 he can assign 2 guests to that)
so in trying to setup my shop using nop to model that scenario, i do this:
public class customer //already exists in nop
{
public virtual ICollection<Guest> Guests {}
}
the events are productvariants in nop terminology (acc to my understanding)
but i cant figureout where to put the mapping table that maps CustomerId, EventId(productvariantId from the orderproductvariant table?) and GuestId
-------------------------------------------------------
i tried this out using a simple scenario where i made a many to many relation b/w guests and events and it works fine,
and i can add guests to events using the events.guests navigation property
but i need to have it work with customers, am havin a hard time wrapping my head around it and merging it with nop dbase
public class Guest
{
public int GuestId { get; set; }
public string GuestName { get; set; }
public virtual ICollection<Event> Events { get; set; }
}
public class Event
{
public int EventId { get; set; }
public string EventName { get; set; }
public virtual ICollection<Guest> Guests { get; set; }
}