© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
13 replies
hutonahill

✅ Understanding and working around `this`

I am developing an API that uses .NET 8 Identity. i had it all up and running, but i needed the default endpoints defined in
app.MapIdentityApi<IdentityUser>()
app.MapIdentityApi<IdentityUser>()
to work a little differently. i was told in order to get this functionality i needed to re impliment those endpoints. So i dug into the libraries (spesificly
IdentityApiEndpointRouteBuilderExtensions.cs
IdentityApiEndpointRouteBuilderExtensions.cs
in the namespace
Microsoft.AspNetCore.Routing
Microsoft.AspNetCore.Routing
), found MapIdentityApi, and coppied it into Program.cs.

So far so good. ive coppied in a bunch of other code and ive got it all working... Except... the signiture:
 public static IEndpointConventionBuilder MapIdentityApi<TUser>(this IEndpointRouteBuilder endpoints)
        where TUser : class, new(){
 public static IEndpointConventionBuilder MapIdentityApi<TUser>(this IEndpointRouteBuilder endpoints)
        where TUser : class, new(){


I have no idea what to do about
this IEndpointRouteBuilder endpoints
this IEndpointRouteBuilder endpoints
. What does the
this
this
keyword do? how can i simulate the functionality of the
endpoints
endpoints
parameter? Is this a lost cause? Why don't libraries have comments?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

❔ Understanding guidelines around use of 'bool'
C#CC# / help
3y ago
Not understanding this lesson
C#CC# / help
12mo ago
i need help understanding this
C#CC# / help
2y ago
Help with understanding this logic question.
C#CC# / help
11mo ago