I have a many to many relation beetween Group and Content table in sql and i imperilment this with a junction table .it name is GroupContent .
when i try to insert a new Group and Content the Openaccess insert a Group and a Content and Dose not insert any record to my junction table. this is my code
using (Context orm = new Context ())
{
Group objGroup = new Group();
objGroup.GroupName = "group 1";
Content objContent = new Content();
objContent.ContentDetail = "content 1";
objGroup.Contents.Add(objContent );
orm.Add(objGroup );
orm.Add(objContent);
orm.SaveChanges();
}
Can i Use this to code with Entity Framework.