Hi John,
In order to write the filter only one time I suggest you to add custom
EndPoints for the entities that have
IS_DELETED column in the database by extending your
Domain Model with a partial class.
For your convenience I prepared the following two-step tutorial demonstrating that approach.
1. Create a partial class.
2. Implement new
EndPoints.
Please bear in mind that the partial class should be in the same assembly and in the same namespace as your
Domain Model.
After that you will be able to choose whether to get all of the records from the database or only the filtered one without manually writing the filter each time – look at the example below:
I hope this is applicable for you.
All the best,
Dimitar Tachev
the Telerik team
Telerik OpenAccess ORM Meets ASP.NET Web API.
Read more.