I have the following class:
public class Home
{
[Key]
public string Name { get; set; }
[ForeignKey("Header")]
public int HeaderID { get; set; }
public Content Header { get; set; }
}
public class Header
{
//...sone attributes
public ICollection<Home> Homes { get; set; }
}
I can't get data till making the Header null
Home item= BookingContext.Home.Include("Slides").FirstOrDefault();
item.Header = null;
is there any better way because I think I'm not in the correct way.