This code:
IList<string> quids;
quids = db.Database.SqlQuery<string>("dbo.getById @Id",
new SqlParameter { ParameterName = "Id", Value = 1 });
It produces the following error message:
It is not possible to implicitly convert the type 'System.Data.Entity.Infrastructure.DbRawSqlQuery' to 'System.Collections.Generic.IList.
An explicit conversion exists (do you miss the role?)
Can someone explain to me how I can hide the collection?
source
share