Base solution for your next web application
Open Closed

Power Tools 3.2.1 Master Detail Page Error #11163


User avatar
0
carlo.benitez created
  • What is your product version? 11.2.1
  • What is your product type (Angular or MVC)? Angular
  • What is product framework type (.net framework or .net core)? .net core

Hi,

I was trying to follow the Power Tools guide in creating a master-details table and keep on encountering an issue where the generated masterDetailChild component does not match the number of arguments for the service proxy.

Error: src/app/main/shipping/routeSchedules/masterDetailChild_Route_routeSchedules.component.ts:108:14 - error TS2554: Expected 6 arguments, but got 5.

108             .getRouteSchedulesToExcel(
                 ~~~~~~~~~~~~~~~~~~~~~~~~~
109                 this.filterText,
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
113                 this.routeId
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
114             )
    ~~~~~~~~~~~~~

  src/shared/service-proxies/service-proxies.ts:10264:216
    10264     getRouteSchedulesToExcel(filter: string | undefined, maxDayOfWeekFilter: number | undefined, minDayOfWeekFilter: number | undefined, accountNumberFilter: string | undefined, routeCodeFilter: string | undefined, routeIdFilter: number | undefined): Observable<FileDto> {
                                                                                                                                                                                                                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    An argument for 'routeIdFilter' was not provided.




× Failed to compile.

5 Answer(s)
  • User Avatar
    0
    musa.demir created

    Hi @carlo.benitez

    Can you share the json files of your entities?

  • User Avatar
    0
    carlo.benitez created

    Here is the Child entity:

    namespace SprintTek.Shipping
    {
        [Table("RouteSchedules")]
        public class RouteSchedule : Entity, IMayHaveTenant
        {
            public int? TenantId { get; set; }
    
            public virtual int DayOfWeek { get; set; }
    
            public virtual string AccountNumber { get; set; }
    
            public virtual int? RouteId { get; set; }
    
            [ForeignKey("RouteId")]
            public Route RouteFk { get; set; }
    
        }
    }
    

    Base Entity

    namespace SprintTek.Shipping
    {
        [Table("Routes")]
        public class Route : Entity, IMayHaveTenant
        {
            public int? TenantId { get; set; }
    
            public virtual string Code { get; set; }
    
        }
    }
    
  • User Avatar
    0
    musa.demir created

    Powertool generates json files which contains entity information for every generated entity. I was asking them. They are located in \aspnet-core\AspNetZeroRadTool. They will be named Shipping.Route.json and Shipping.RouteSchedule.json

  • User Avatar
    0
    carlo.benitez created

    Here you go RouteSchedule Route

  • User Avatar
    0
    musa.demir created

    Hi @carlo.benitez

    I could not reproduce the problem. Can you please share the project with the [email protected]