I have a similar situation, to this post the delete works but only on students and classes table, in the student_classes table the elements are not deleted.
public class Students
{
[PrimaryKey, AutoIncrement]
public int StudentId { get; set; }
public string Name { get; set; }
[ManyToMany(typeof(Students_Classes))]
public List<Classes> Classes { get; set; }
}
public class Classes
{
[PrimaryKey, AutoIncrement]
public int ClassId { get; set; }
public string Name { get; set; }
[ManyToMany(typeof(Students_Classes))]
public List<Students> Students { get; set; }
}
public class Students_Classes
{
[PrimaryKey, AutoIncrement]
public int StudentClassesId { get; set; }
[ForeignKey(typeof(Students))]
public int StudentFId { get; set; }
[ForeignKey(typeof(Classes))]
public int ClassFId { get; set; }
}
To delete I use the following code
conn.Delete(student, true);
I have no problem during insert and updates thanks
p.s. My classes have different names, but doesn't matter, the code is really identical