ravendb/ravendb — Issue #390: Indexing array of potentially null
Author: DanielDar
Created: 2011-10-23 09:05:34+00:00
State: open

public class Orders_Search : AbstractIndexCreationTask
{
public class ReduceResult
{
public string Query { get; set; }
public DateTime OrderedAt { get;set; }
}
public Orders_Search()
{
Map = orders => from order in orders
select new
{
Query = new[]
{
order.FirstName,
order.LastName,
order.OrderNumber,
order.Email,
order.CompanyName
},
order.OrderedAt
};
}
}

when Order Number is null, we get an error