@@ -445,83 +445,92 @@ public static RouteHandlerBuilder MapFirst<TEntity, TFilter, TId1, TId2, TId3>(t
445445 /// Maps a GET endpoint to a first DTO based on the applied filter.
446446 /// </summary>
447447 /// <typeparam name="TEntity">The type of the entity to be queried.</typeparam>
448+ /// <typeparam name="TDto">The type of the DTO to be returned.</typeparam>
448449 /// <typeparam name="TFilter">The type of the applied filter.</typeparam>
449450 /// <param name="builder">The route builder.</param>
450451 /// <param name="pattern">The route pattern.</param>
451452 /// <returns>A builder for additional endpoint configuration.</returns>
452- public static RouteHandlerBuilder MapFirstDto < TEntity , TFilter > ( this IEndpointRouteBuilder builder ,
453+ public static RouteHandlerBuilder MapSelectFirst < TEntity , TDto , TFilter > ( this IEndpointRouteBuilder builder ,
453454 [ StringSyntax ( "Route" ) ] string pattern )
454455 where TEntity : class
456+ where TDto : class
455457 where TFilter : class
456458 {
457- var first = new FirstEntityEndpoint < TEntity , TFilter > ( ) ;
459+ var first = new FirstModelEndpoint < TEntity , TDto , TFilter > ( ) ;
458460 return builder . MapGet ( pattern , first . First ) ;
459461 }
460462
461463 /// <summary>
462464 /// Maps a GET endpoint to a first DTO based on the applied filter.
463465 /// </summary>
464466 /// <typeparam name="TEntity">The type of the entity to be queried.</typeparam>
467+ /// <typeparam name="TDto">The type of the DTO to be returned.</typeparam>
465468 /// <typeparam name="TFilter">The type of the applied filter.</typeparam>
466469 /// <param name="builder">The route builder.</param>
467470 /// <param name="pattern">The route pattern.</param>
468471 /// <param name="searchAction">Action to apply additional logic to the search criteria.</param>
469472 /// <returns>A builder for additional endpoint configuration.</returns>
470- public static RouteHandlerBuilder MapFirstDto < TEntity , TFilter > ( this IEndpointRouteBuilder builder ,
473+ public static RouteHandlerBuilder MapSelectFirst < TEntity , TDto , TFilter > ( this IEndpointRouteBuilder builder ,
471474 [ StringSyntax ( "Route" ) ] string pattern ,
472475 Action < ICriteria < TEntity > > searchAction )
473476 where TEntity : class
477+ where TDto : class
474478 where TFilter : class
475479 {
476- var first = new FirstEntityEndpoint < TEntity , TFilter > ( searchAction ) ;
480+ var first = new FirstModelEndpoint < TEntity , TDto , TFilter > ( searchAction ) ;
477481 return builder . MapGet ( pattern , first . First ) ;
478482 }
479483
480484 /// <summary>
481485 /// Maps a GET endpoint to a first DTO based on the applied filter with an additional identifier.
482486 /// </summary>
483487 /// <typeparam name="TEntity">The type of the entity to be queried.</typeparam>
488+ /// <typeparam name="TDto">The type of the DTO to be returned.</typeparam>
484489 /// <typeparam name="TFilter">The type of the applied filter.</typeparam>
485490 /// <typeparam name="TId">The type of the first additional identifier.</typeparam>
486491 /// <param name="builder">The route builder.</param>
487492 /// <param name="pattern">The route pattern.</param>
488493 /// <param name="searchAction">Action to apply additional logic to the search criteria.</param>
489494 /// <returns>A builder for additional endpoint configuration.</returns>
490- public static RouteHandlerBuilder MapFirstDto < TEntity , TFilter , TId > ( this IEndpointRouteBuilder builder ,
495+ public static RouteHandlerBuilder MapSelectFirst < TEntity , TDto , TFilter , TId > ( this IEndpointRouteBuilder builder ,
491496 [ StringSyntax ( "Route" ) ] string pattern ,
492497 Action < TId , ICriteria < TEntity > > searchAction )
493498 where TEntity : class
499+ where TDto : class
494500 where TFilter : class
495501 {
496- var first = new FirstEntityEndpoint < TEntity , TFilter , TId > ( searchAction ) ;
502+ var first = new FirstModelEndpoint < TEntity , TDto , TFilter , TId > ( searchAction ) ;
497503 return builder . MapGet ( pattern , first . First ) ;
498504 }
499505
500506 /// <summary>
501507 /// Maps a GET endpoint to a first DTO based on the applied filter with two additional identifiers.
502508 /// </summary>
503509 /// <typeparam name="TEntity">The type of the entity to be queried.</typeparam>
510+ /// <typeparam name="TDto">The type of the DTO to be returned.</typeparam>
504511 /// <typeparam name="TFilter">The type of the applied filter.</typeparam>
505512 /// <typeparam name="TId1">The type of the first additional identifier.</typeparam>
506513 /// <typeparam name="TId2">The type of the second additional identifier.</typeparam>
507514 /// <param name="builder">The route builder.</param>
508515 /// <param name="pattern">The route pattern.</param>
509516 /// <param name="searchAction">Action to apply additional logic to the search criteria.</param>
510517 /// <returns>A builder for additional endpoint configuration.</returns>
511- public static RouteHandlerBuilder MapFirstDto < TEntity , TFilter , TId1 , TId2 > ( this IEndpointRouteBuilder builder ,
518+ public static RouteHandlerBuilder MapSelectFirst < TEntity , TDto , TFilter , TId1 , TId2 > ( this IEndpointRouteBuilder builder ,
512519 [ StringSyntax ( "Route" ) ] string pattern ,
513520 Action < TId1 , TId2 , ICriteria < TEntity > > searchAction )
514521 where TEntity : class
522+ where TDto : class
515523 where TFilter : class
516524 {
517- var first = new FirstEntityEndpoint < TEntity , TFilter , TId1 , TId2 > ( searchAction ) ;
525+ var first = new FirstModelEndpoint < TEntity , TDto , TFilter , TId1 , TId2 > ( searchAction ) ;
518526 return builder . MapGet ( pattern , first . First ) ;
519527 }
520528
521529 /// <summary>
522530 /// Maps a GET endpoint to a first DTO based on the applied filter with three additional identifiers.
523531 /// </summary>
524532 /// <typeparam name="TEntity">The type of the entity to be queried.</typeparam>
533+ /// <typeparam name="TDto">The type of the DTO to be returned.</typeparam>
525534 /// <typeparam name="TFilter">The type of the applied filter.</typeparam>
526535 /// <typeparam name="TId1">The type of the first additional identifier.</typeparam>
527536 /// <typeparam name="TId2">The type of the second additional identifier.</typeparam>
@@ -530,13 +539,14 @@ public static RouteHandlerBuilder MapFirstDto<TEntity, TFilter, TId1, TId2>(this
530539 /// <param name="pattern">The route pattern.</param>
531540 /// <param name="searchAction">Action to apply additional logic to the search criteria.</param>
532541 /// <returns>A builder for additional endpoint configuration.</returns>
533- public static RouteHandlerBuilder MapFirstDto < TEntity , TFilter , TId1 , TId2 , TId3 > ( this IEndpointRouteBuilder builder ,
542+ public static RouteHandlerBuilder MapSelectFirst < TEntity , TDto , TFilter , TId1 , TId2 , TId3 > ( this IEndpointRouteBuilder builder ,
534543 [ StringSyntax ( "Route" ) ] string pattern ,
535544 Action < TId1 , TId2 , TId3 , ICriteria < TEntity > > searchAction )
536545 where TEntity : class
546+ where TDto : class
537547 where TFilter : class
538548 {
539- var first = new FirstEntityEndpoint < TEntity , TFilter , TId1 , TId2 , TId3 > ( searchAction ) ;
549+ var first = new FirstModelEndpoint < TEntity , TDto , TFilter , TId1 , TId2 , TId3 > ( searchAction ) ;
540550 return builder . MapGet ( pattern , first . First ) ;
541551 }
542552
0 commit comments