I'm guessing that you mean EF, using fluent API.
This is a simple model, so shouldn't need a custom mapper.
public class Movie
{
[Key]
public int MovieID { get; set; }
public string Title { get; set; }
public string Storyline { get; set; }
public string Year { get; set; }
public string Runtime { get; set; }
public DateTime ReleaseDate { get; set; }
public DateTime DateTimeAdded { get; set; }
public DateTime? DateTimeEdited { get; set; }
public virtual ICollection<MovieProducers> MovieProducers { get; set; }
}
Then we link back by simply adding a foreign key attribute to MovieProducers. This attribute points to a virtual property.
public class MovieProducer
{
[Key]
public int MovieProducerID { get; set; }
[ForeignKey("Movie")]
public int MovieID { get; set; }
[ForeignKey("Person")]
public int PersonID { get; set; }
public virtual Movie Movie{ get; set; }
public virtual People Person { get; set; }
}
You should have fully mapped access with this structure.