When PATCH request payload contains a property in exponential notation (e.g. {"Balance":3e-7}) the de-serialized Delta object is always null and the model state is invalid.
*Microsoft.AspNetCore.OData 7.3.0
@dennis3001 Is the declaring type for the Balance property a double? I tried it practically with the exact value you provided above (3e-7) and the delta object is valid and even managed to get the Balance property updated by calling the Patch method of the delta.
Payload:
{
"@odata.context": "http://ServiceRoot/$metadata#Customers/$entity",
"Id": 1,
"Name": "Customer 1",
"Balance": 3e-7
}
Result:

Can you try and strip your case to the bare minimum (or create a simple repro) to confirm if it's the Balance property value causing your delta to appear as null?
Hi @gathogojr
Thanks for response. The balance is Nullable decimal in my case, not double.
@dennis3001 Thanks for clarifying. In that case, it's more of a C# language restriction rather than OData issue. Consider the following two statements:
decimal m = 3e-7; // Illegal in C# - even appending an m at the end does not make it legal
double d = 3e-7; // Legal in C#
But it does work fine when you have a regular controller with [FromBody] parameter.
Its just deserilazed as 0.0000003
@dennis3001 Just a correction about the statement I made here. The first statement is legal if you add an m at the end. Let me take another look at this and revert
@dennis3001 I investigated this issue further and made some observations. It doesn't appear to be restricted to PATCH request or OData delta implementation. The OData POST and PUT controller actions don't also seem to support decimals expressed in exponential/scientific notation.
It does appear like it should be supported based on the OData standard
decimalValue = [ SIGN ] 1*DIGIT [ "." 1*DIGIT ] [ "e" [ SIGN ] 1*DIGIT ] / nanInfinity
Another observation is that classic ASP.NET WebApi applications supports it and appears to coerce the scientific notation value into a decimal without a hitch.
I'm labeling it as a bug so it's added to our backlog for further scrutiny
cc. @mumbi-o @chrisspre @xuzhg