Vlog02 [eng sub]什麼是controller和如何在asp.net核心中創建controller?-what is controller ...SernHao TV
您好,我是SernHao Tv 的Sern Hao, 今天我想要跟您分享的是"關於ASP.Net Core 里的 Controller"。
Hi, I'm Sern Hao from SernHao Tv, the topic I want to share with you is "About Controller in ASP.Net Core".
在這裡,我將深入淺出的為您解說幾個關於ASP.Net Core 裡的 Controller 的幾個要點:
1)什麼是Controller?
- 是在MVC裡的一個互動的Class。
- 在MVC裡,View是用來顯示資訊。 Model是用來鏈接資料庫。而Controller則是負責在View與Model之間接收和傳遞數據。
- 連接Model (或數據)和View。
2) Controller的基本用法。 (demo)
- Controller 處理 Http-Post (route data) and Http-Get (query-string)
- 接收從View得到的用戶輸入的資料,然後給予特定的反應。
- 執行business rule和functions。
3) 如何在ASP.Net Core裡創建 Controller。 (demo)
- 在影片裡,我會講解有關Controller如何被創建,以及一些主要的用途。
- 同時也會帶過Controller在ASP.net Core 裡的生命週期。
- 默認模板: "{controller=Home}/{action=Index}/{id?}") 【“/[Controller]/[ActionName]/[Parameters]”】
- 在 Solution Explorer里, 在“Controllers”的文件夹点击右键 , “Add” , “New Item...“ , 选择”MVC Controller Class“
- “Index”是在“Controller”上默認調用的方法,
附加的:
1) ASP.Net Core 是個.Net Framework,它使用.Net Framework 4.6. .Net Core 也可以算是C# 和MVC 1- 6 系列的一個很大的進步。而這裡的ASP.Net Core 會使用的開發工具是visual studio 2015。
2)在Visual Studio 2015中,您可以在更改程序並保存代碼後通過刷新瀏覽器以達到重新運行應用程序,而不用進行debugging(Ctrl + F5)。
希望我的解说能帮到您。
----------------------------------------------------------------------------
如果您喜欢我的影片,或是我的影片对您有所帮助,
请帮忙点击”喜欢“或“分享”给需要的人哦~
-------------------------------------------------------------------------------------------
如果您对影片有什么建议,或是想看到什么科技与程序编写的教学,
请”留言”给我哦~
-------------------------------------------------------------------------------------------
如果您还想接受到更多关于科技与程序编写的教学,
也请帮忙”订阅“我哦~
----------------------------------------------------------------------------
Hi, how are you? I'm Sern Hao from SernHao Tv, the topic I want to share with you is "About Controller in ASP.Net Core".
Here, I will explain in simple terms for you to explain a few on the ASP.Net Core about Controller in a few key points:
1) What is the Controller?
- is an interactive Class in the MVC.
- In MVC, View is used to display information. Model is used to link the database. The Controller is responsible for receiving and transferring data between View a
Introduce twMVC
list text here ASP.NET MVC 可以吃嗎?
ASP.NET MVC 的成功案例
什麼是 MVC
MVC 概觀
ASP.NET MVC 對物件導向的潛移默化
View 簡介
View Engine
HTML Helper
Partial View
Razer Helper 小技巧
How I make a podcast website using serverless technology in 2023Shengyou Fan
In 2022, I launched a Kotlin podcast show, Kotlin Fireside Chat, with my friends in Kotlin User Group. Now, we're taking things to the next level by building a podcast website with a statistical analysis dashboard. We've built a static website using Jamstack and connected it to a serverless API written in Kotlin. In order to aggregate the listener number across platforms, such as YouTube, BiliBili, Ximalaya, Lizhi, Qingting, we've also created a crawler to grab those numbers and display them in a custom dashboard. Everything is made by open source technology and deployed on Google Cloud Platform. In this talk, I'll share my experience and the lessons I learned when using all the technologies in 2023.
Using the Exposed SQL Framework to Manage Your DatabaseShengyou Fan
The document discusses using the Exposed SQL framework to manage databases in Kotlin. It introduces Exposed as an open source SQL framework made by JetBrains that supports PostgreSQL, SQLite, Oracle, SQL Server and H2. Exposed provides two levels of database access - a DSL for type-safe SQL and DAOs for lightweight data objects. It demonstrates defining database schemas, connecting to databases, interacting with tables using the DSL and DAO, and building relationships between tables.
簡化 JVM 上雲 - 透過 Azure Spring Cloud 提升開發、發佈及服務監控效率Shengyou Fan
Spring Boot 一直是 Java 開發生態系裡市佔率最高的框架,許多企業都採用其開發自身服務。隨著開發典範的轉移,即便 Spring 提供完整方案,開發者往往對架構修改及服務管理的工作怯步,是否移轉上雲也有所疑慮。在這場分享裡,將會介紹由 Azure 提供的 Spring Cloud 解決方案,並從最簡單的一個 Spring Boot 應用開始,逐步導入微服務架構、連接 Azure DB、藍綠部署到服務監控,讓開發者了解使用 Azure 運行 Spring 是一個簡單又有效率的體驗,加速將 JVM 應用上雲。