mirror of
https://github.com/kataras/iris.git
synced 2025-12-19 02:47:04 +00:00
.NET Core vs Iris MVC vs Iris (classic API with Handlers)
Former-commit-id: 19c71f41c0864d2f3f36627e9da53b4802a4476b
This commit is contained in:
21
_benchmarks/iris-mvc/controllers/values_controller.go
Normal file
21
_benchmarks/iris-mvc/controllers/values_controller.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package controllers
|
||||
|
||||
import "github.com/kataras/iris/mvc"
|
||||
|
||||
// ValuesController is the equivalent
|
||||
// `ValuesController` of the .net core 2.0 mvc application.
|
||||
type ValuesController struct {
|
||||
mvc.Controller
|
||||
}
|
||||
|
||||
// Get handles "GET" requests to "api/values/{id}".
|
||||
func (vc *ValuesController) Get() {
|
||||
// id,_ := vc.Params.GetInt("id")
|
||||
vc.Ctx.Writef("value")
|
||||
}
|
||||
|
||||
// Put handles "PUT" requests to "api/values/{id}".
|
||||
func (vc *ValuesController) Put() {}
|
||||
|
||||
// Delete handles "DELETE" requests to "api/values/{id}".
|
||||
func (vc *ValuesController) Delete() {}
|
||||
Reference in New Issue
Block a user