200 likes | 342 Views
Deep Dive into ADO.NET Data Services. Agenda. Service Extensibility Custom Object Model Operation Batching ASP.NET AJAX client. Service Extensibility. Service Operations Query Interceptors Change Interceptors. Data Service. Data Model. Products. Categories. Service Operations.
E N D
Agenda • Service Extensibility • Custom Object Model • Operation Batching • ASP.NET AJAX client
Service Extensibility • Service Operations • Query Interceptors • Change Interceptors Data Service Data Model Products Categories
Service Operations Data Service /GetBrakes GetBrakes() HTTP GET/POST Data Model Products Categories
Query Interceptor /Products Data Service HTTP GET Query Interceptor Data Model Products Categories
Change Interceptors /Products /Products(1) Data Service HTTP POST HTTP PUT/DELETE Change Interceptor Data Model Products Categories
Service Extensibility – Why? • Service Operations • Business logic • Data shaping • Custom endpoint • Query Interceptor • Data filter • Row-level security • Change Interceptor • Business logic • Logging • Data modification
Demo Service Extensibility
Demo Custom Object Model
Operation Batching Without batching Data Service Context Data Service POST PUT POST DELETE DELETE 5 server hits Operations: Add Entity #1 Update Entity Add Entity #2 Delete Entity #1 Delete Entity #2
Operation Batching With batching Data Service Context Data Service POST /$batch 1 server hit Operations: Add Entity Update Entity Add Entity #2 Delete Entity Delete Entity #2
Operation Batching Without batching Data Service Context Data Service GET GET GET 3 server hits Operations: Get Entity #1 Get Entity #2 Get Entity #3
Operation Batching With batching Data Service Context Data Service GET /$batch 1 server hit Operations: Get Entity #1 Get Entity #2 Get Entity #3
Demo Operation Batching
ASP.NET AJAX Client Client Server Sys.Data. DataService Data Service HTTP JSON Data Model
ASP.NET AJAX Client • Sys.Data.ActionSequence • Sys.Data.DataService • Sys.Data.QueryBuilder
Demo ASP.NET AJAX Client
Summary • Service Extensibility • Query Batching • Custom Object Model • ASP.NET AJAX client