There are two entities A and B. They have a one to many relationship. Assume A to be the following type.
class A
{
public int Id { get; set; }
public bool isActive{ get; set; }
public ICollection<B> BCollection{ get; set; }
//Rest Of A properties
}
class B
{
public int Id { get; set; }
public A A{ get; set; }
public int AId{ get; set; }
public bool isAActive{ get; set; }
//Rest of B Properties
}
S in B AId is foreign key of the primary key Id in A. This entity framework configured by itself due to having an A instance in B.
Is there a way via entity framework that I can configure my DBSet so that value of isAActive is automatically set depending on value of isActive in A?