I have a class that have all properties private to set:
public class MyClass
{
public int Id {get;private set;}
public int IdChild {get;private set;}
public string SomeProperty {get;private set;}
public virtual Child Child {get;private set;}
}
So, to modify their properties, i have to: (by example)
1) Call method to modify the property:
myclass.SetChild(child);
So, how I can create an entity (I´m using EF Code First) with a Dynamic Proxy?
var myClass = myContext.MyClass.Create();
myClass.Id = 1 // Cannot do that, because this property is "Private Set"
PS: I already have ProxyCreation and LazyLoad enabled!