Hi,
I would prefer you to use the Server side code, not the Odata/REST OR SOAP call...
Odata is for client side request only... like in the CRM form, in any web resource which deployed in CRM.
So, in Web Application you can wirte a code in code behind OR you can create a web service of Retrieve from CRM (or whatever you need), then call it like a Odata call.