Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify API-building experience without controllers #27347

Closed
3 tasks done
mkArtakMSFT opened this issue Oct 29, 2020 · 4 comments
Closed
3 tasks done

Simplify API-building experience without controllers #27347

mkArtakMSFT opened this issue Oct 29, 2020 · 4 comments
Assignees
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions enhancement This issue represents an ask for new feature or an enhancement to an existing one
Milestone

Comments

@mkArtakMSFT
Copy link
Member

mkArtakMSFT commented Oct 29, 2020

@mkArtakMSFT mkArtakMSFT added enhancement This issue represents an ask for new feature or an enhancement to an existing one Theme: cloud native labels Oct 29, 2020
@mkArtakMSFT mkArtakMSFT added this to the Next sprint planning milestone Oct 29, 2020
@ghost
Copy link

ghost commented Oct 29, 2020

Thanks for contacting us.
We're moving this issue to the Next sprint planning milestone for future evaluation / consideration. We will evaluate the request when we are planning the work for the next milestone. To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.

@halter73
Copy link
Member

halter73 commented Dec 9, 2020

Next steps:

  1. Prototype a non-source-gen version of MapAction (see source-gen version in uController). Runtime-generation (expression trees allowed). This could avoid intellisense/overload resolution issues the source-gen version has to deal with.

  2. Design what a possible reflection API for lambda attributes might look like. See the houdini meeting notes.

Endpoints.MapPost("/api/todos/{id}", [Authorize] async (HttpContext http, TodoDbContext db, [FromBody] Todo inputTodo) =>
{
    var todo = await db.Todos.FindAsync(inputTodo.Id);
    if (todo == null)
    {
        http.Response.StatusCode = 404;
        return;
    }

    todo.IsComplete = inputTodo.IsComplete;
    await db.SaveChangesAsync();
    http.Response.StatusCode = 204;
});

@Pilchie Pilchie added the area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates label Dec 15, 2020
@rcollette
Copy link

To me EndPoints.MapPost looks like a Route attribute turned into a method that takes an action as a parameter.

I'm not sure what the value in that is, but happy to be schooled.

@halter73 halter73 modified the milestones: Next sprint planning, 6.0.0 May 6, 2021
@halter73 halter73 added area-runtime and removed area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates labels May 6, 2021
@halter73
Copy link
Member

halter73 commented May 6, 2021

Forgot about this one. Replace by #32378

@halter73 halter73 closed this as completed May 6, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Jun 5, 2021
@amcasey amcasey added area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions and removed area-runtime labels Aug 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions enhancement This issue represents an ask for new feature or an enhancement to an existing one
Projects
None yet
Development

No branches or pull requests

7 participants