I am using OData library to implement kind of dynamic proxy behavior.
Is there some built-in method that creates an empty instance of ODataEntry from the metadata model?
I am thinking of something like:
IEdmModel model; // metadata model instance
IEdmEntityType elementType; // metadata for entity type i want to use
ODataEntry newEntry = model.CreateNewEntryFrom(elementType)
The result is an ODataEntry instance populated with the properties for that element type with all values set to defaults (zero or null).
I need this method in order to create an intitial empty ODataEntry that I can use as data context in a detail form and then later POST to the data service using ODataMessageWriter framework.
If there is no such method:
How can I achieve it by using the public interfaces of well-known namespaces:
The (ideal) goal is to use the public API of ODataLib, without touching its source code.
Any help would be appreciated.