Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Modern WebAPIS with ASP.NET Core
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Fabian Gosebrink
June 25, 2018
Technology
1
130
Modern WebAPIS with ASP.NET Core
Slides for my talk at the DWX 2018 in Nürnberg "Modern WebAPIs with ASP.NET Core"
Fabian Gosebrink
June 25, 2018
Tweet
Share
More Decks by Fabian Gosebrink
See All by Fabian Gosebrink
Modern Angular Apps in 2026
fabiangosebrink
0
33
Why State is the Most Important Part of Your Angular Application
fabiangosebrink
0
95
Angular testing made easy with Jest and Cypress
fabiangosebrink
0
130
Introducing state management into an application with NgRx
fabiangosebrink
0
210
Scalable architectures in Angular with Nx
fabiangosebrink
0
170
My Biggest Angular Mistakes and How To Avoid Them
fabiangosebrink
0
280
[iJS Munich] Better Angular Architectures with Libraries and Nx
fabiangosebrink
0
170
Mastering State Management in Angular with the NgRx Signal Store
fabiangosebrink
0
430
Angular Architectures with NgRx Stores & Effects
fabiangosebrink
0
130
Other Decks in Technology
See All in Technology
Shifting from MCP to Skills / ベストプラクティスの変遷を辿る
yamanoku
4
770
スクリプトの先へ!AIエージェントと組み合わせる モバイルE2Eテスト
error96num
0
150
ナレッジワーク IT情報系キャリア研究セッション資料(情報処理学会 第88回全国大会 )
kworkdev
PRO
0
160
AIファーストを前提とした開発スタイルの変化
sbtechnight
0
280
2026-03-11 JAWS-UG 茨城 #12 改めてALBを便利に使う
masasuzu
2
340
Evolution of Claude Code & How to use features
oikon48
1
570
20260305_【白金鉱業】分析者が地理情報を武器にするための軽量なアドホック分析環境
yucho147
3
220
A Gentle Introduction to Transformers
keio_smilab
PRO
2
1k
Abuse report だけじゃない。AWS から緊急連絡が来る状況とは?昨今の攻撃や被害の事例の紹介と備えておきたい考え方について
kazzpapa3
1
390
類似画像検索モデルの開発ノウハウ
lycorptech_jp
PRO
4
1.1k
Security Diaries of an Open Source IAM
ahus1
0
210
Agentic Software Modernization - Back to the Roots (Zürich Agentic Coding and Architectures, März 2026)
feststelltaste
1
230
Featured
See All Featured
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.6k
The Curse of the Amulet
leimatthew05
1
9.8k
Color Theory Basics | Prateek | Gurzu
gurzu
0
240
Ruling the World: When Life Gets Gamed
codingconduct
0
170
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
110
Automating Front-end Workflow
addyosmani
1370
200k
Code Reviewing Like a Champion
maltzj
528
40k
GraphQLの誤解/rethinking-graphql
sonatard
75
11k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
670
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
270
RailsConf 2023
tenderlove
30
1.4k
Transcript
with Building modern WebAPIs ASP.NET Core
None
None
None
@FabianGosebrink
None
https://developer-academy.ch
with Building modern WebAPIs ASP.NET Core
What is ASP.NET Core?
MVC + WebAPI + Web Pages
None
Faster Deployment Cycles
None
Tooling
DOTNET CLI fabian gosebrink
class Program { static void Main(string[] args) { Console.WriteLine("Hello World!");
} }
DOTNET CLI fabian gosebrink
Program.cs 1. public class Program 2. { 3. public static
void Main(string[] args) 4. { 5. CreateWebHostBuilder(args).Build().Run(); 6. } 7. 8. public static IWebHostBuilder CreateWebHostBuilder(string[] args) => 9. WebHost.CreateDefaultBuilder(args) 10. .UseStartup<Startup>(); 11. }
public static IWebHostBuilder CreateDefaultBuilder(string[] args) { var builder = new
WebHostBuilder(); builder.UseKestrel(...) .ConfigureAppConfiguration((hostingContext, config) => { config.AddJsonFile( "appsettings.json", optional: true, reloadOnChange: true); }) .ConfigureLogging((hostingContext, logging) => { logging.AddConfiguration(hostingContext.Configuration.GetSection("Logging")); logging.AddConsole(); logging.AddDebug(); }) .ConfigureServices((hostingContext, services) => { //... }) .UseIISIntegration(); return builder; }
Dependency Injection
Startup.cs 1. public class Startup 2. { 3. public Startup(IConfiguration
configuration) 4. { 5. Configuration = configuration; 6. } 7. 8. public IConfiguration Configuration { get; } 9. 10. public void ConfigureServices(IServiceCollection services) 11. { 12. services.AddOptions(); 13. 14. services.AddCors(...); 15.
Kestrel
None
REST
What is Rest?
Rest is not WebAPI
Rest is not HTTP
None
Architectural Style
GET /api/orders/ GET /api/orders/1 POST /api/orders/ PUT /api/orders/1 DELETE /api/orders/1
Rest Constraints
Richardson Maturity Model
STATUSCODES
export const isSuccess = (status): boolean => (status >= 200
&& status < 300)
2xx
4xx
5xx
The Controller 1. [Route("api/[controller]")] 2. public class FoodController : Controller
3. { 4. private readonly IFoodRepository _foodRepository; 5. 6. public FoodController(IFoodRepository foodRepository) 7. { 8. _foodRepository = foodRepository; 9. } 10. 11. [HttpGet] 12. public ActionResult<List<FoodItemDto>> Get() 13. { 14. ICollection<FoodItem> foodItems = _foodRepository.GetAll(); 15. IEnumerable<FoodItemDto> dtos = foodItems 16. .Select(x => Mapper.Map<FoodItemDto>(x)); 17. 18. return Ok(dtos);
Documentation
Documentation
None
VERSIONING
document.docx
document- nal.docx
document- nal- nal.docx
document-really- nal.docx
document-really- nal-end- of-discussion.docx
document-really- nal- approved-by- customer.docx
document-really- nal- approved-by-customer- with-alterations- suggested-by-his- assistant.docx
document-really- nal-approved- by-customer-with-alterations- suggested-by-his-assistant-and- his-friend-cause-apparently-he- thinks-he-knows-all-about-good- api-design
document-really- nal-approved- by-customer-with-alterations- suggested-by-his-assistant-and- his-friend-cause-apparently-he- thinks-he-knows-all-about-good- api-design.docx
None
None
DEMO
/api/houses?page=4&pageSize=10
/api/houses?orderby=Id
/api/houses?fields=street,number
HATEOAS
{ "departmentId": 10, "departmentName": "Administration", "locationId": 1700, "managerId": 200, "links":
[ { "href": "10/employees", "rel": "employees", "type" : "GET" } ] }
SignalR
None
None
None
Le Fin
@FabianGosebrink https://offering.solutions/
[email protected]
https://github.com/FabianGosebrink https://github.com/FabianGosebrink/ASPNETCore- WebAPI-Sample
Resources https://media.giphy.com/media/1BXa2alBjrCXC/giphy.gif http://img0.joyreactor.com/pics/post/photo-india-it-programmer-548432.jpeg