CarterCommunity / Carter

Carter is framework that is a thin layer of extension methods and functionality over ASP.NET Core allowing code to be more explicit and most importantly more enjoyable.
MIT License
2.06k stars 174 forks source link

Move to (req,res) API format #214

Closed jchannon closed 4 years ago

jchannon commented 4 years ago

Remove routeData as an arg.

RouteData can be used off the req object:

            this.Get<GetActorById>("/actors/{id:int}", (req, res) =>
            {
                var person = actorProvider.Get(req.RouteValues.As<int>("id"));
                return res.Negotiate(person);
            });