I have this schema:
create table Person
(
id int identity primary key,
name nvarchar(30)
)
create table PersonPersons
(
PersonId references Person(id),
ChildPersonId references Person(id)
)
how to create the classes to map them using EF4 Code First CTP5 ?
For the POCO...
...set up the mapping in the DbContext...
...will give you a default implementation. If you need to rename the table explicitly (and want a many-to-many relationship), add in something like this...