Koristim Angular 6 za front i C# ( .net core) kao API.
U Angularu pozovem API, koji mi vraca podatke u odredjenom tipu (DTO), i kada stavim break-point na backend (API), on vrati sa velikim pocetnim slovom, kao i sto sam Visual Studio nalaze da u DTO-u svaki property ima pocetno veliko slovo.
Medjutim, front ga, unutar subscribe metode, vraca malim slovima, iako je naglaseno da ocekuje isti DTO tip.
Da li neko ima ideju sta moze da pravi problem?
Controller service:
Code:
public GetPlayerProfileData() {
let controllerUrl = this.environment + "players/GetPlayerProfileData";
return this.http.get<PlayerProfileDto>(controllerUrl);
}
public GetPlayerProfileData() {
let controllerUrl = this.environment + "players/GetPlayerProfileData";
return this.http.get<PlayerProfileDto>(controllerUrl);
}
Code:
this.controllerService.GetPlayerProfileData().subscribe(x => {
this.profileData = x; --> (x vraca rezultat malim slovima)
this.controllerService.GetPlayerProfileData().subscribe(x => {
this.profileData = x; --> (x vraca rezultat malim slovima)