Q:

Can I run SqlQuery on a View?

So I have this query: 
  var retval = db.v_AViewOfJoinedTables.SqlQuery("SELECT * FROM dbo.v_AViewOfJoinedTables WHERE @filter = '@value';", 
                                          new SqlParameter("@filter", columnname), 
                                          new SqlParameter("@value", value)).ToList();

But I'm not getting any result. If I run this query through SSMS, it returns data. I know if I use a table instead that it works. So can SqlQuery only work on tables or is something wrong my query or code?
UPDATED CODE:
        SqlCommandBuilder scb = new SqlCommandBuilder();
        string columnname = userNameFilterType;
        string escapedColumnName = scb.QuoteIdentifier(columnname);
        string sqlQuery = String.Format("SELECT * FROM dbo.v_AViewOfJoinedTables WHERE {0} = '@username';", escapedColumnName);
        var retval = db.v_AViewOfJoinedTables.SqlQuery(sqlQuery, new SqlParameter("username", currentUser)).ToList();
        return retval.AsQueryable();

A:

The problem isn't the view.  You can't use SQL parameters for table or column names.  
... where @filter = ...

That won't work.  It must be text.  Just use string interpolation to insert it:
var retval = db.v_AViewOfJoinedTables.SqlQuery($"SELECT * FROM dbo.v_AViewOfJoinedTables WHERE {columnname} = @value;",
    new SqlParameter("@value", value)).ToList();

The SQL Execution Engine will cache the execution plan of queries you run, but it can't do that if the query itself changes.  The plan might change depending on the column name, for instance.  So, SQL parameters will only ever work as values supplied to the query.
You also need to remove the single quotes around @value.  The SQL Server provider will handle the quote insertion for you.

