How to add a Precision attribute on a long data type in the metadata (odata/.net framework 4.61) RRS feed

  • Question

  • Hello, I am not sure if this is the right group, but my question is on the generation of metadata for an ODATA based WEB API .

    The field in question is defined in our SQL Server database as bigint, which is interpreted as LONG in the EDM model.

    And the odata generated metadata file has the property entry for this field as below:

    <Property Name="XXXKeyNumeric" Nullable="false" Type="Edm.Int64"/>

    Our vendors require a precision atttribute on this property. Basically it should display like this

    <Property Name="XXXKeyNumeric" Precision="10" Type="Edm.Int64"/>

    Is it possible to add a precision attribute to a Long data type? at least the available intellisense or functions did not allow us. Is there any work around for this.

    Thanks in advance

    Wednesday, February 12, 2020 2:28 PM

All replies

  • Hi kalmantri,

    Apologize for the delayed response.

    I find your question is more related to ASP.NET. Therefore, it will be more appropriate to ask your question in ASP.NET Forums

    he CLR Forum discuss and ask questions about .NET Framework Base Classes (BCL) such as Collections, I/O, Regigistry, Globalization, Reflection. Also discuss all the other Microsoft libraries that are built on or extend the .NET Framework, including Managed Extensibility Framework (MEF), Charting Controls, CardSpace, Windows Identity Foundation (WIF), Point of Sale (POS), Transactions.

    Thank you for your understanding.

    Best Regards,

    Xingyu Zhao

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, February 20, 2020 10:51 AM