OData / OData/AspNetCoreOData

No controller action is called when the key is int16\short.

Open
#40 1 comment 0 reactions 1 assignee View on GitHub

@xuzhg is already working on this.

Since Dec 3, 2020.

ODL
Dominant language
C#
Stars
505
Forks
186
PR merge metrics
No merged PRs in 30d

Description

Hello,
I use the "ASP.NET Core OData 8.0.0 preview".

If you have an entity with the key of type short\int16, the following controller method is not called:

public IActionResult Get(short key)

To reproduce you can change the ODataRoutingSample with the following update:

ProductsController.cs -> public IActionResult Get(short key)
ODataOperationImportController.cs -> Id = Convert.ToInt16(index)
Product.cs -> Product class -> public short Id { get; set; }

When the key is int32 the following calls work fine but if the key is short\int16 the Get(short key) method is not called.
http://localhost:64771/products(1)

Fabio

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.