Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
ASP.NET MVC 分頁與排序相關技巧-twMVC#13
Search
twMVC
May 10, 2014
Technology
710
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
ASP.NET MVC 分頁與排序相關技巧-twMVC#13
講者:Dino(twMVC核心講者)
講者簡介:TechDay & MSDN 講師
華人健康網製作、管理與維護
現職:禾盛數碼科技有限公司
簡介:彩蛋。
課程時間:70分鐘
twMVC
May 10, 2014
More Decks by twMVC
See All by twMVC
打造一個 Application Framework - twMVC#15
twmvc
0
690
開發的效能與效率 - twMVC#15
twmvc
5
1.7k
RWD不是你想的那樣!-twMVC#13
twmvc
3
920
樞紐分析表之數據分析與統計-twMVC#14
twmvc
0
740
輕鬆上手ASP.NET Web API 2-twMVC#14
twmvc
0
670
如何在實務上使用TDD來開發 - twMVC#12
twmvc
3
860
架構設計入門- twMVC#11
twmvc
0
610
Visual Studio 2013 全新功能介紹-twMVC#11
twmvc
0
1.1k
ASP.NET MVC Model 的設計與使用-twMVC#10
twmvc
2
880
Other Decks in Technology
See All in Technology
Omarchy Quattro の日本語設定周り
simosako
2
180
LTのテーマ どうきめてる?〜5つの型と私のやり方〜
yama3133
1
100
おい、エージェントを使って終わらせろ
nwiizo
0
240
事業課題から技術的負債に向き合う
sansantech
PRO
2
1.8k
白金鉱業Meetup Vol.25 アウトカムが二値のデータに対するCausal Impact
brainpadpr
0
200
Deployment の 先にある AI Agent 基盤 - kagent vNext、Agent Substrate、Hermes から読み解く Agent Runtime の現在地 / k8s-matsuri-2-ai-agent-platform-amsy810
masayaaoyama
3
560
Genieを崇めよ
kameitomohiro
0
130
新機種発売前に見直そう!端末移行で再ログインが要るアプリ・要らないアプリは何が違うのか 〜シームレスに再開できる設計と実装〜
zozotech
PRO
0
190
データ界隈LT祭 第1回LT登壇
taromatsui_cccmkhd
1
1.3k
作品が生態系になった ─ Mini Tokyo 3D から世界へ
nagix
0
190
「守り」で活用するオンデバイスLLM 〜写ってはいけないを総力戦で防ぐ〜 / iOSDC Japan 2026
nakamuuu
0
160
日経電子版を支えていく Kasane Design System/fec_fukuoka
nikkei_engineer_recruiting
0
1.5k
Featured
See All Featured
Ten Tips & Tricks for a 🌱 transition
stuffmc
1
230
Heart Work Chapter 1 - Part 1
lfama
PRO
10
36k
The Spectacular Lies of Maps
axbom
PRO
1
990
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Prompt Engineering for Job Search
mfonobong
0
450
Producing Creativity
orderedlist
PRO
348
41k
RailsConf 2023
tenderlove
30
1.5k
Agile that works and the tools we love
rasmusluckow
331
22k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
800
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
The Cult of Friendly URLs
andyhume
79
7k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
490
Transcript
ASP.NET MVC 實戰分享 分頁與排序相關技巧 twMVC #13 http://mvc.tw/
http://mvc.tw Pageable Filterable Sortable Adaptable
Expandable 今天準備了一個簡單又必備的課題 2
http://mvc.tw 分頁、過濾、排序 實戰 做什麼系統幾乎都會用到(吧) 其實是個好練習題 深入研究過別人的作法嗎
還沒在非商演場次中講過這套 今天準備了一個簡單又必備的課題 3
http://mvc.tw 入門實戰 Live coding 充分展現過程 給不知道該怎麼作的朋友瞭解 ASP.NET
MVC 實作的一種思考方式 彈性化擴充 這是一套可以重複使用的 pattern 是吃飯的傢伙,本來不太好拿來說嘴的 (我告訴你,你不要告訴別人啊 XD) 從入門實戰開始,彈性化擴充結束 4
http://mvc.tw 再擴充 Partial update 是進階功課,你可以回去發想,作適合自家 系統的調整 喜歡的話也可以拿來當
twMVC 週四聚會討(ㄌㄚˇ)論(ㄙㄞˋ) 的材料 從入門實戰開始,彈性化擴充結束 5
http://mvc.tw AdventureWorks Databases https://msftdbprodsamples.codeplex.com/ 資料庫準備 6
http://mvc.tw 從無到有 直搗黃龍 來來來,來決定哪一個地方開始 7
http://mvc.tw Entity Framework 如何以 Database-First 建立一個實體資料模型 Model
LINQ 我們會用到基本的 LINQ (要講的話時間不夠) 然後突然用到有點難度的 (要講的話大家會睡著) 部分會跳過不講的內容 8
http://mvc.tw 從無到有 直搗黃龍 其實也差不了多少,跳過一個 Model 的建立而已 … 已經會的忍耐幾分鐘
所以,來決定一個地方開始 9
10 實作 (I)
http://mvc.tw 雖然可以使用了,但是寫起來很累人 尤其是排序的程式碼需要大量的 if / switch,每次講範例的 時候都被笑
介紹我家好貨 累人的版本作完了 11 五伯合體懶人包!
12 實作 (II)
http://mvc.tw https://gist.github.com/dinowang/6302408 程式碼的參考來源 13
http://mvc.tw 屬性 Page PageSize Column
Order Result 方法 SetSource QueryOption<T> 14
http://mvc.tw 方法 Html.SortableFor QueryOptionHtmlExtension 15
http://mvc.tw https://gist.github.com/dinowang/6302408 Entity Framework 4.x / 5.x /
6.x 都可以 目前無法做成 NuGet 套件,因為 有想法,沒時間 其實 js 跟版面 layout 息息相關,做成套件也無法一步到位 程式碼的參考來源 16
http://mvc.tw 好活動需要支持 感謝 KKTIX 贊助 twMVC 活動報名平台 17
http://mvc.tw 好課程需要支持 18 http://skilltree.my
謝謝各位 • 本投影片所包含的商標與文字皆屬原著作者所有。 • 本投影片使用的圖片皆從網路搜尋。 • 本著作係採用姓名標示-非商業性-相同方式分享 3.0 台灣授權。閱讀本授權條款,請到 http://creativecommons.org/licenses/by-nc-sa/3.0/tw/,或寫信至Creative
Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA. h t t p : / / m v c . t w