Hi,
I am upgrading my legacy ASP.NET web API to Core. This upgrading process is harder than I expected. The problem I'm having now is, this query gets the GameBank and GameBankPin in my legacy application. But the same code doesn't work in the Core application, unfortunately. GameBankPin is NULL.
Legacy:
Core 6:
Query:
Entities:
I am upgrading my legacy ASP.NET web API to Core. This upgrading process is harder than I expected. The problem I'm having now is, this query gets the GameBank and GameBankPin in my legacy application. But the same code doesn't work in the Core application, unfortunately. GameBankPin is NULL.
Legacy:
Core 6:
Query:
C#:
var gameBankResult =
//Query GameBank database
_unitOfWork.GameBankRepository.GetGames(g =>
g.productCode == requestDto.productCode && g.referenceId == Guid.Empty);
Entities:
C#:
public class GameBank
{
public int GameBankID { get; set; }
public Guid referenceId { get; set; }
[DisplayName("Product Code")]
public string productCode { get; set; }
public int quantity { get; set; }
public string? version { get; set; }
public DateTime? requestDateTime { get; set; } = DateTime.Now;
public int? customerID { get; set; }
public string? password { get; set; }
public DateTime? responseDateTime { get; set; } = DateTime.Now;
public string? initiationResultCode { get; set; }
public string? companyToken { get; set; }
[DisplayName("Reconciled")]
public int used { get; set; }
[DisplayName("Description")]
public string? productDescription { get; set; }
public string? currency { get; set; }
[DisplayName("Unit Price")]
public double unitPrice { get; set; }
public double totalPrice { get; set; }
public string? ApplicationCode { get; set; }
public double estimateUnitPrice { get; set; }
public string? validatedToken { get; set; }
public string? signature { get; set; }
[DisplayName("Confirm/Cancel Status")]
public int status { get; set; }
public virtual List<GameBankPin> coupons { get; set; }
public string? clientTrxRef { get; set; }
}
public class GameBankPin
{
public int Id { get; set; }
public int GameBankID { get; set; }
public DateTime? expiryDate { get; set; }
public string Serial { get; set; }
public string Pin { get; set; }
public virtual GameBank GameBanks { get; set; }
}