1

Does the ABP template for .NET Core have the features listed in Javascript-API?

More importantly, can the .NET Core version generate the dynamic proxy (services.ts) corresponding to my server-side entities?

0

2 Answers 2

1

Yes, the ABP template for .NET Core has all the features listed in Javascript-API.

ABP does not generate the dynamic proxy. Recommended tool used by the ABP team is NSwag:

We are using nswag to generate typescript service proxied. Nswag uses swagger endpoint to get service definitions and creates typescript classes automatically. Since there is such a great tool, we didn't want to work on that.

Sign up to request clarification or add additional context in comments.

1 Comment

i've found out the presence of the file nswag\refresh.bat that autogenerates the .ts proxies (into the angular part of the abp core template). This is an awesome feature and MUST BE DOCUMENTED!!! it is super useful, thanks guys
1

yes it supports all the features for core version. but there's no dynamic proxy creation. you use abp.ajax for app service requests in Angular version.

abp.ajax({
    url: AppConsts.remoteServiceBaseUrl + '/AbpUserConfiguration/GetAll',
    method: 'GET',
}
}).done(result => {
    //....
});

an example usage of nswag generated service;

  constructor(
        injector: Injector,
        private _accountService: AccountServiceProxy,
        private _router: Router,
        private readonly _loginService: LoginService
    ) {
        super(injector);
    }

    save(): void {
        this.saving = true;
        this._accountService.register(this.model)
            .finally(() => { this.saving = false; })
            .subscribe((result:RegisterOutput) => {
                if (!result.canLogin) {
                    this.notify.success(this.l('SuccessfullyRegistered'));
                    this._router.navigate(['/login']);
                    return;
                }

                //Autheticate
                this.saving = true;
                this._loginService.authenticateModel.userNameOrEmailAddress = this.model.userName;
                this._loginService.authenticateModel.password = this.model.password;
                this._loginService.authenticate(() => { this.saving = false; });
            });
    }

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.