skip to Main Content

Phpmyadmin – C# EF Core MySQL to LINQ return nothing

var IdSubProduct = new MySqlConnector.MySqlParameter("IdSubProduct", this.parameter.Id.ToString()); FormattableString cmd = $@"SELECT spr.*, c.Name CustomerName FROM ProductSubProductRate spr LEFT JOIN LibraryCustomer c ON (c.Id = spr.CustomerId) WHERE (spr.IdSubProduct = {IdSubProduct})"; this.contextSQL.ProductSubProductRate.FromSql(cmd).ToList(); this.contextSQL.ProductSubProductRate .Include("Customers") .Where(pr => pr.IdSubProduct == this.parameter.Id.ToString()) .Select(pr => new {…

VIEW QUESTION

Mysql – LINQ Query for below table

Table data: Id_Org_hierarchy Hierarchy_Name Parent_Id_Org_hierarchy 1 OGt 0 2 NHT 1 3 BATCH 1 2 3 Voice 1 I need result Like Below: Batch1(NHT,OGT) Details : Id_Org_hierarchy column value is present in Parent_Id_Org_hierarchy and so on its a tree struct…

VIEW QUESTION
Back To Top
Search