Call Stored Procedure using Entity Framework FromSqlRaw in ASP.Net Core

Ruben12345
 
on Feb 27, 2020 11:10 PM
2923 Views

how to retreive httpget data stored procedure in net core 3.1

[HttpGet]
[Route("api/Talent/GetTalents")]
public async Task<IEnumerable<GetTalent>> GetTalents(GetTalent model)
{
    var param = new SqlParameter("@Id", model.Id);
    return await db.GetTalents.FromSqlRaw("EXEC sp_Tbl_Mst_TalentSelect @Id", param).ToListAsync();
}
Download FREE API for Word, Excel and PDF in ASP.Net: Download