We have string to int conversion issue…
var cogQuery = Db.From<CogLoadDataModel.Cognos.Sale>()
.Join<CogLoadDataModel.Cognos.Customer>((sale, cust) => sale.ShipToSID == cust.Id)
.Join<CogLoadDataModel.Cognos.Product>((sale, prod) => sale.ProductSID == prod.Id)
.Where(x => x.EntityCd == entityCd);
try
{
//var test = Db.Select<(int? EntityCd, string OrderNum, int? InvoiceLineNum, int? OrderLineNum, string InvoiceNum, string ShipToCd, string ProductCd)>(cogQuery);
var test2 = Db.Select<(string OrderNum, int? EntityCd, int? InvoiceLineNum, int? OrderLineNum, string InvoiceNum, string ShipToCd, string ProductCd)>(cogQuery);
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
if we run the first Db.Select we get an error saying we can convert to int…
the second one give no issue. In the database EntityCD exist in all 3 tables as integer nullable but the data does not have null value.
Look like the first item need to be a string. Can you confirm please.