question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Disable property in ODataController

See original GitHub issue

How remove/disable property in OData ?

For example:

http://localhost:21021/odata/Persons?$filter=TenantId eq '1'&$orderby=CreationTime&$top=100

how remove TenantId in query/post ?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
marcribcommented, Oct 14, 2018

@acjh this not default in aspnetboilerplate? Is a serious security error, I can filter and add data in another tenant

cc @hikalkan

0reactions
CrazyBarancommented, Oct 25, 2018

builder.EntitySet<Persons>.EntityType.Ignore(x=>x.TenantId); It should disable property from odata model.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Exclude property from WebApi OData (EF) response in c# - ...
What you need to do is make an odata controller that returns a projected subset of the original entity. //in WebApi Config Method...
Read more >
Attribute Routing in ASP.NET Core OData 8.0 RC
We can also disable the attribute routing globally using EnableAttributeRouting property on ODataOptions.
Read more >
Using OData Controller in .NET Core APIs | by Sıddık Açıl
Here, EnableQuery attribute enables an endpoint to have OData ... We will now enable Selection, Expansion, Count, Filter, OrderBy, ...
Read more >
Make ASP.NET Core api controller methods queryable with a ...
In order to make us of the [EnableQuery] attribute, we first need to configure Odata as described in Step 1 of this series....
Read more >
Working With OData in ASP.NET Core
To define an OData service, simply derive from ODataController. This is a base class for OData controllers that support writing and reading data ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found