score:0
you could pull the conditional operator out of the object creation.
from t in tasks
join user in userinfo on t.publisher equals user.account into temp
from userinfo in temp.defaultifempty()
select userinfo != null
? new
{
t.title,
iscertificated = userinfo.iscertificated
}
: new
{
t.title,
iscertificated = false
}
Source: stackoverflow.com
Related Query
- LINQ left join with nullable values
- LINQ - Multiple left joins with nullable values
- Linq left join with multiple columns and default values
- Left Join in Linq with nullable references
- Multiple Left Join with Linq and Defaults Values
- Trouble with linq left join only including values that are a match
- Linq left join with condition with nullable string
- How to handle ViewBag with null values from linq with left outer join in razor view
- LINQ to SQL - Left Outer Join with multiple join conditions
- Convert SQL to Linq left join with null
- How do I most elegantly express left join with aggregate SQL as LINQ query
- Linq - Left outer join with dot notation
- Left join on two Lists and maintain one property from the right with Linq
- How to left join multiple tables with LINQ
- Linq with Left Join on SubQuery containing Count
- Left outer join using LINQ -- understanding the code
- Linq left outer join with custom comparator
- C# LINQ Select objects with the same value of one property join values of other
- JOIN and LEFT JOIN equivalent in LINQ with Method Syntax
- LINQ left join with only the row having maximum value of a column
- LINQ LEFT JOIN not working on NULL values
- Using LINQ left join with multiple conditions and subquery
- SQL to LINQ with multiple join, count and left join
- LInq left join with multiple condition in on clause
- Left join with OrderBy in LINQ
- Linq left join on nullable field
- LINQ Left Outer Join combined with Let
- Left outer Join with LINQ
- LINQ & Enum with Left Join
- How make LINQ query with GroupBy and LEFT JOIN
More Query from same tag
- Linq extension method, how to find child in collection recursive
- Sorting List<Struct> items by order of int variable in each struct
- OrderBy Collection in Dictionary Value based on Property of the Collection
- Adding a default string if list empty
- DataTable Select vs List<T> LINQ Performance
- Why does C# compiler create private DisplayClass when using LINQ method Any() and how can I avoid it?
- Automatically populating an object using Linq to XML
- Getting Table's Row Index Using LINQ
- LINQ Performance: For vs. LINQ difference gone in C# 6?
- How can I make a list of the element numbers in a list that have a field that is not null?
- LINQ query does not compile when using double, float, or decimal instead of int
- What's wrong with this LINQ, converting one object to another?
- How to have a LINQ Query - Distinct()
- Fast autocomplete from in-memory collection (.NET)
- How to select table name dynamically in Linq or Entity Framework
- How to compare two `List<MyObject1> with List<MyObject2>`?
- How to get the data value of an enum in a generic method?
- How can I dynamically change the condition of where, depending on the parameter
- SQL to LINQ C# with join max and group
- grouping objects by time gap
- Transposing the list based on property names in C#
- Comparing 2 string Class Lists C#
- Where condition equal true and Nullable object must have a value
- EF Core include an ICollection<T> with a filter on the collection's referenced object
- How to build an empty generic IMongoQueryable<TEntity> type queryable object
- Inserting and saving xml using Linq to XML
- C# Linq Subset Data
- Linq query with join and where not equals
- LINQ query help (LINQ to SQL)
- More efficient way using Linq? (CRUD operation)