\u7d50\u8ad6<\/strong><\/p>\n\n\n\n\u5df2\u4e0a\u4f8b\u5b50\u986f\u793aOData\u7684\u512a\u9ede\uff0c\u6211\u5011\u53ea\u8981\u7a0d\u5fae\u66f4\u6539\u67e5\u8a62\u8a9e\u53e5\u5c31\u53ef\u5f97\u5230\u6211\u5011\u60f3\u8981\u7684\u8cc7\u6599\u683c\u5f0f\u3002\u82e5\u7528\u5176\u5b83Restful API\u65b9\u6cd5\uff0c\u5247\u53ef\u80fd\u9700\u8981\u5927\u6539\u7a0b\u5f0f\u78bc\u3002\u4e14\u8981\u8b93OData\u5354\u5b9a\u518dASP.NET FRAMEWORK\u6216ASP.NET CORE\u6846\u67b6\u4e2d\u5de5\u4f5c\uff0c\u53ea\u9700\u4e0b\u8f09\u8a72\u5957\u4ef6\u548c\u64b0\u5beb4\uff0c5\u884c\u7a0b\u5f0f\u78bc\u5373\u53ef\u3002\u53ef\u4ee5\u8aaaOData\u662f\u4e00\u500b\u597d\u7528\u4e14\u6613\u65bc\u5be6\u8e10Restful API\u65b9\u5f0f\u7684Standard\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"
OData\u5354\u5b9a(Open Data Protocol)\u57282007\u5e74\u7531\u5fae\u8edf\u63d0\u51fa\uff0c\u4e2d\u6587\u540d\u958b\u653e\u6578\u64da\u5354\u5b9a\u3002\u76ee\u524d\u5df2\u7531\u539f\u672c1.0\u7248\u672c\u52304.0\u3002\u73fe\u5df2\u88abOASIS (Organization for the Advancement of Structured Information Standards)\u8a8d\u53ef\u3002\u8a72\u5354\u5b9a\u4e3b\u8981\u5df2REST\u539f\u5247\uff0c\u900f\u904eHTTP\u5354\u5b9a\u63d0\u4f9bCRUD\u5b58\u53d6\u670d\u52d9\u3002OData\u4e5f\u63d0\u4f9b\u4e00\u4e9b\u7279\u5225\u8a9e\u6cd5\u8b93\u4f7f\u7528\u8005(Http Client)\u4f86\u904e\u6ffe(filter)\u8cc7\u6599\u67e5\u8a62(query)\u548c\u5ba2\u88fd\u5316data model\uff0c\u8b93\u4f7f\u7528\u8005\u4e0d\u5fc5\u5927\u6539\u7a0b\u5f0f\u78bc\u5c31\u53ef\u7372\u5f97\u5b83\u60f3\u8981\u7684\u6578\u64da\u7d50\u69cb\u548c\u683c\u5f0f\uff0c\u6eff\u8db3\u5ba2\u6236\u6216\u4f7f\u7528\u8005\u7684\u9700\u6c42\u3002\u73fe\u5728ASP.NET CORE\u548cASP.NET FRAMEWORK\u6846\u67b6\u90fd\u652f\u63f4OData\u3002\u672c\u7bc7\u6587\u7ae0\u6703\u4ecb\u7d39\u5982\u4f55\u8b93OData\u5be6\u4f5c\u5728ASP.NET FRAMEWORK\u548cASP.NET CORE\u6846\u67b6\u4e0a\uff0c\u4e5f\u6703\u8209\u4e9bOData API\u7684\u5be6\u969b\u7bc4\u4f8b\u3002 OData\u8a9e\u6cd5 OData\u67e5\u8a62\u9078\u9805 Odata\u67e5\u8a62\u65b9\u6cd5 \u610f\u7fa9 $top = n \u8868\u793a\u56de\u50b3\u524dn\u7b46\u8cc7\u6599 $skip = n \u8868\u793a\u7565\u904e\u524dn\u7b46\u8cc7\u6599 $Orderby \u6c7a\u5b9a\u8cc7\u6599\u7684\u7d50\u679c\u6d3e\u5e8f $filter \u56de\u50b3\u7b26\u5408\u689d\u4ef6\u7684\u8cc7\u6599 ASP.NET FRAMEWORK \u9700\u5148\u4e0b\u8f09OData\u5957\u4ef6 \u63a5\u8005\u5728WebApiConfig.cs \u4fee\u6539\u5982\u4e0b Controller\u8981\u7e7c\u627fODataController\u985e\u5225 \u5728Web API\u88e1\uff0c\u8a18\u5f97\u5728HTTP\u65b9\u6cd5\u524d\u5148\u52a0\u4e0a[EnableQuery]Attribute ASP.NET CORE \u60f3\u8981\u5728ASP.NET CORE\u6846\u67b6\u4e0b\u5be6\u4f5cOData\uff0c\u548cASP.NETCORE\u4e00\u6a23\u9700\u8981\u5148\u4e0b\u8f09OData\u5957\u4ef6\u3002 \u518d\u52a0\u4e0a\u4e0b\u9762\u7684\u4ee3\u78bc \u6700\u5f8c\u8a18\u5f97\u8981\u5728HTTP\u65b9\u6cd5\u4e0a\u52a0\u4e0a[EnableQuery]\u7684Attribute OData\u5be6\u4f8b \u4ee5\u4e0b\u70baODATA\u5be6\u7528\u4f8b\u5b50 Model \u63a5\u8005\u518d\u9810\u8a2d\u597d\u8cc7\u6599 \u57f7\u884c\u5f8c\u6253\u4e0a\u4ee5\u4e0bURL \u51fa\u73fe\u756b\u9762 \u82e5\u66f4\u6539URL\u70ba […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[38],"tags":[],"class_list":["post-344","post","type-post","status-publish","format-standard","hentry","category-pg"],"yoast_head":"\n
OData\u5354\u5b9a\u4ecb\u7d39 - Who said turtle cannot fly<\/title>\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\t \n\t \n\t \n