protected virtual bool IsReadOnlyMember(MemberReferenceExpression container) { switch (container.Entity.EntityType) { case EntityType.Property: { return(((IProperty)container.Entity).GetSetMethod() == null); } case EntityType.Field: { return(TypeSystemServices.IsReadOnlyField((IField)container.Entity)); } } return(true); }