Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
string endPointsClassName = Model.EndpointsName;
string methodName = $"Map{@modelName}Endpoints";
string pluralModel = Model.ModelType.PluralName;
string routePrefixPlural = "/api/" + pluralModel;
string getAllModels = $"GetAll{@pluralModel}";
string getModelById = $"Get{@modelName}ById";
string deleteModel = $"Delete{@modelName}";
Expand Down Expand Up @@ -94,11 +95,11 @@ public static class @endPointsClassName
@{
if(!Model.UseTypedResults)
{
@://return Results.Created($"/@pluralModel/{model.ID}", model);
@://return Results.Created($"@routePrefixPlural/{model.ID}", model);
}
else
{
@://return TypedResults.Created($"/@pluralModel/{model.ID}", model);
@://return TypedResults.Created($"@routePrefixPlural/{model.ID}", model);
}
}
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
string endPointsClassName = Model.EndpointsName;
string methodName = $"Map{@modelName}Endpoints";
string pluralModel = Model.ModelType.PluralName;
string routePrefixPlural = "/api/" + pluralModel;
string getAllModels = $"GetAll{@pluralModel}";
string getModelById = $"Get{@modelName}ById";
string deleteModel = $"Delete{@modelName}";
Expand Down Expand Up @@ -85,11 +86,11 @@
@{
if(!Model.UseTypedResults)
{
@://return Results.Created($"/@pluralModel/{model.ID}", model);
@://return Results.Created($"@routePrefixPlural/{model.ID}", model);
}
else
{
@://return TypedResults.Created($"/@pluralModel/{model.ID}", model);
@://return TypedResults.Created($"@routePrefixPlural/{model.ID}", model);
}
}
})
Expand Down