abp icon indicating copy to clipboard operation
abp copied to clipboard

System. Int32 in Angular when primary key is int

Open HiteshAnshani opened this issue 6 years ago • 1 comments

When we use int as primary key in dotnetcore then dto generated in angular is

AuditedEntityDto<System.Int32>

System.Int32 which is not valid in angular so please replace it with number. And after correcting it manually it works but when we develop more APIs in dotnetcore and then again run the proxy command in angular it will again do System.Int32 in the old model as well.

Steps:

Create Dto

 public class ABCDto : AuditedEntityDto<int>
 {
        public string Name { get; set; }

        public string Description { get; set; }
  }

then use this dto in service

and then run proxy in angular you will get this

export class ABCDto extends AuditedEntityDto<System.Int32>
{
      name: string;

      description: string;
}

HiteshAnshani avatar Jun 24 '20 17:06 HiteshAnshani

@maliming can you understand and fix this?

hikalkan avatar Jun 27 '20 19:06 hikalkan