I have Entity Framework models that I want to pass to SendGrid dynamic templates.
I think the way to do this is to convert a model, including all non-null complex properties, and excluding specified properties (like User.Password and no, I don't have that) into a dynamic POCO. Is there a way to do this? (This example points to a non-existent page.)
Note this is not reverse POCO, this is pass it an object, list exclusions, get back a dynamic POCO of just the simple properties & complex properties that are themselves composed of simple properties.
One way of putting it is the generated object could easily be converted to JSON (I think).
Or is there another way? The goal is I have model objects I've read from the DB and I want to pass them to SendGrid, without the confidential properties.
Update: Or, would this work. Is there a way to go from model => JSON => POCO? And then edit that created POCO? And if so, how?