0

Im trying to use the OData Connected Service in Visual Studio to connect to a OData Feed in Bridge (RESO Feed).

However, If I try and pull the metadata directly from a URL, it has errors Adding OData Connected Service to the project failed: Could not get CLR type name for EDM type 'memberMediaEnums.ResourceName'

So I went ahead and downloaded the XML file and tweaked it to get rid of the errors and warnings. This includes Removing Entity references with no parents and removing attributes that were not supported like Precision.

Once its all loaded and the reference file is created I tried pulling data. The endpoint works and data is retrieved, but it is not thrown into the object as i would expect.

IEnumerable<Property> properties= await context.Property.ExecuteAsync();

foreach (var property in properties) //Errors trying to make a property
{
   Console.WriteLine("{0} {1}", property.YearBuilt, property.ListPrice);
}

When I try and loop over the object I get this error: The context URI 'https://api.bridgedataoutput.com/api/v2/OData/imls2/$metadata#Property' is not valid for the expected payload kind 'Resource'.

Where I am confused, is in the name Resource There is no object or entity in the Reference file or in the XML scheme that references that word. I'm not sure if its coming from OData services or the reference file it created. The call stack does not contain anything but the exact line of the loop.

Any insights would be helpful but i know its a long shot. Let me know if I need to provide more details.

Thanks

littlevahn
  • 637
  • 2
  • 8
  • 25

0 Answers0