Calling a Stored Procedure from Entity Framework - EF6

With Result Set


using (var db = new MyDataModel())
{
    var p1 = new SqlParameter("@OrderId", orderId);

    var sql = "dbo.GetOrderDetails @OrderId";

    var q = db.Database.SqlQuery<OrderDetail>(sql, p1).ToList();
}