Entity Framework Update nested list

c# entity-framework entity-framework-6

Accepted Answer

It's unclear from your query what kind of connection you have, but I assume it's one-to-many, in which case something like this should work:

public class DialogSession
{
    public int DialogSessionId { get; set; }
    public virtual DialogUser DialogUser { get; set; }
}

public class DialogUser
{
    public int DialogUserId { get; set; }
    public virtual ICollection<DialogSession> DialogSessions { get; set; }
}

Look at this article for an illustration of how to set up this kind of connection correctly.

1
12/13/2016 6:02:16 PM

Popular Answer

ZZZ_tmp


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow