Hi @Ahmed Abd El Aziz
Based on the expected result and your data table, I use the following query statement to get the same result.
var printserver = "10";
var itemlist = _context.BranchPDFexes.ToList().Where(c => c.PrintServer == printserver)
.SelectMany(c => c.BranchCode.Split(",").AsEnumerable().Select(bc => new BranchViewModel() { PrintServer = c.PrintServer, BranchId = bc }))
.GroupJoin(_context.Branches, bpdf => bpdf.BranchId, branch => branch.iBranchCode, (bpdf, branch) => new { Bpdf = bpdf, Bra = branch }).DefaultIfEmpty()
.Select(x=> new BranchViewModel() { PrintServer = x.Bpdf.PrintServer, BranchId = x.Bpdf.BranchId, vBranchDesc = x.Bra.First().vBranchDesc })
.ToList();
The result as below:

Besides, you can also create a stored procedure on the Database, like this:
CREATE PROCEDURE [dbo].[GetBranchesRelatedToServer]
@PrintServer NVARCHAR(Max)
AS
BEGIN
;with cte as (
SELECT distinct PrintServer,
REPLACE (Split.A.value('.', 'VARCHAR(4000)') , ' ', '' ) as BranchId
FROM (SELECT BranchCode, PrintServer,
CAST ('<M>' + REPLACE(BranchCode, ',', '</M><M>') + '</M>' AS XML) AS String
FROM [dbo].[tbl_branchPDFexe]) AS A CROSS APPLY String.nodes ('/M') AS Split(A))
select t.PrintServer,t.BranchId,b.vBranchDesc from
cte t inner join [dbo].[tbl_Branch] b with(nolock)
on t.BranchId=b.iBranchCode and PrintServer=@PrintServer
END
GO
Then based on the return data to create model:
public class BranchViewModel
{
public string PrintServer { get; set; }
[Key]
public string BranchId { get; set; }
public string vBranchDesc { get; set; }
}
After that, add the DbSet in the DbContext and enable migration to generate data table in the database using the following commands:
add-migration addbranchviewmodel
update-database
Then, in the Controller, you can use the FromSql() method to execute the sql query statement to consume the stored procedure, like this:
var items = _context.BranchViewModels.FromSql($"Execute GetBranchesRelatedToServer '10'").ToList();
It also gets the same result:

If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Best regards,
Dillion