How to get specific columns returned by stored procedure in variable/list using Entity Framework Core

How to get specific columns returned by stored procedure in variable/list using Entity Framework Core

I want to get list of specific columns returned by stored procedure.In the result set two column names will be common and one column name will be dynamic.

I want to get list of specific columns returned by stored procedure.In the result set two column names will be common and one column name will be dynamic.

ALTER PROC DBO.GETLANGUAGETRANSLATION(@LANGCODE VARCHAR(10))
AS
BEGIN
DECLARE @QUERY NVARCHAR(255)
SET @QUERY= N'SELECT RESOURCENAME,ENText,'+UPPER(@LANGCODE)+' INTO #TEMP FROM DBO.LANGUAGETRANSLATION SELECT * FROM #TEMP';
EXEC(@QUERY);
END

RESOURCENAME and ENText column will be same in output each time but based in input parameter third column name will vary.

I am writing below code in C# using Entity Framework Core LINQ

public async Task<IEnumerable<LanguageTranslation>> GetAsync(string langCode)
        {
            var context = new LQMSDbContext(AppConstants.DB_CONNECTION_STRING_KEY);
            try
            {
                string query = "GetLanguageTranslation '" + langCode + "'";
                var result = context.LanguageTranslation.FromSql(query).ToList();
                var result1 = context.Database.ExecuteSqlCommand("GETLANGUAGETRANSLATION @p0", parameters: langCode );
            }
            catch(Exception ex)
            {
                string a = ex.Message;
            }


        return await _dbSet
        .Where(x =&gt; x.Equals(langCode))
         .ToListAsync();
    }

I am trying to call stored procedure GETLANGUAGETRANSLATION using two different approaches. But both are failing with below error

The required column 'ESText' was not present in the results of a 'FromSql' operation

Where ESText refers to the column which I am not returning from stored procedure but present in table.

I want to store only few columns in result set in c# and not all.

Can any body help me in this?

NOTE : It works fine with Select * from LanguageTranslation query


Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

C/C++ vs. Rust: A developer’s perspective

In this post, you'll see the difference between Rust and C/C++ in a developer’s perspective

Linq Many to many in Entity Framework core

I have classes for building many to many relationships.