I am trying to call a stored procedure in C# with EF Core. Just returning custom result set which is not linked to any entity.
But I am getting an error:
Cannot create a DbSet for 'ExCoResponse' because this type is not included in the model for the context.
Here is my method:
public async Task<IEnumerable<ExCoResponse>> UpdateAndGetExcoUsers()
{
return await _context
.Query<ExCoResponse>()
.FromSql("[dbo].[UsersUpdateExcoDetail]")
.ToListAsync();
}