Base solution for your next web application
Open Closed

How can I return DTOs instead of entities in OData? #1624


User avatar
0
antpstevens created

How can I return DTOs instead of entities in OData as AbpODataEntityController accepts TEntity only. Is there a way I can achieve it so that I don't have to go off the framework and build my own Odata module.


1 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    AbpODataEntityController is a simple class actually <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/blob/763e718341a42ef1799d9ded5fae228f652d7a6b/src/Abp.Web.Api.OData/WebApi/OData/Controllers/AbpODataEntityController.cs">https://github.com/aspnetboilerplate/as ... troller.cs</a>

    You can create a similar controller for DTOs and use it in your project.