<ul>
<li><p>How do I utilize a ?: operator in the SELECT clause of a LINQ query?  If this can't be done, how can I emulate one?  The goal is to get a CASE block in my select clause. As you might suspect, I'm getting an error: <em>Invalid anonymous type member declarator. Anonymous type members must be declared with a member assignment, simple name or member access.</em></p></li>
<li><p>Is this the proper way, or a sufficient way, to say "from a inner join i on a.ipid=i.id inner join u on i.uid=u.id"?  If not, please provide one.  Thanks.</p>

<pre><code>var query =
    from a in db.tblActivities
    from i in db.tblIPs
    from u in db.tblUsers 
    select new {
        u.UserName == null
            ? i.Address
            : u.UserName,
        a.Request,
        a.DateTime };
</code></pre></li>
</ul>

I'm fairly new to Linq to SQL but I'm pretty sure it would go like this:
```
```
var query =
    from a in db.tblActivities
    from i in a.tblIPs
    from u in i.tblUsers 
    select new
    {
        userName = (u.UserName == null)
            ? i.Address
            : u.UserName,
        a.Request,
        a.DateTime
    };
```
```
The if statement needs to be in parentheses and the results outside of them.  As for the joins, you follow the chain down from one->many.