score:1
If you change the names of your properties in the view model to the same as the Workflow class it will work.
model = session.Query<Workflow>()
.Select(w => new WorkflowIndexViewModel { Id = w.Id, Name = w.Name })
.ToArray();
But that is just a workaround to what seems to be a bug or a limitation.
Source: stackoverflow.com
Related Articles
- RavenDB: Returning objects with null values for properties
- sorting list of objects with null properties using linq
- Issue with ViewModel returning null values to View
- LINQ query to find objects in list with equal values for one of their properties
- Get objects from dictionary with equal properties values for every Key
- Checking a list with null values for duplicates in C#
- LINQ Order By Descending with Null Values on Bottom
- Sorting a list with null values
- How can I set properties on all items from a linq query with values from another object that is also pulled from a query?
- Dynamic linq order by on nested property with null properties
- Comparing 2 objects and retrieve a list of fields with different values
- Null Dapper.net query still returning Null Reference Exception with FirstOrDefault()
- Getting unique values from a list of objects with a List<string> as a property
- Sum a collection of objects which contain numeric properties only with LINQ
- C# LINQ Select objects with the same value of one property join values of other
- Linq to Dictionary<string, List<string>> with Null values
- Joining two tables with LINQ while also returning null records from the second table
- How to GroupBy objects by numeric values with tolerance factor?
- C# Create object with dynamic properties : LINQ select List<object> values by property names array
- Returning values with a Func Delegate
- Queryable.Aggregate is not working with null values
- EF Code First comparing null values generates strange query
- How to concat strings in LINQ while properly dealing with NULL values
- C# LINQ GroupBy with NULL values
- LINQ to Entities null reference on Union with nested objects
- Convert Dictionary<int, int?> to Dictionary<int, int> by skipping null values with LINQ
- List of objects to Dictionary with distinct keys and selected values
- Using LINQ SequenceEqual extension method with occassionally null properties
- Remove objects with duplicate properties from List
- Linq sort with Null values
- How do I translate a query that uses ROW_NUMBER() into linq?
- lock keyword on a LINQ Parallel.ForEach<> loop
- Do an Include on list derived on DBQuery
- Group by on a List And Return Top 1 Row
- How do I best handle data in my application
- Filter lists with LINQ
- Using SQL instead of LINQ in Telerik Open Access
- GroupJoin by date where date in second list between two dates from first
- Add a single query result to a List
- Check difference between 2 IEnumerables
- How to join group item of Linq Query Group By?
- How to find the difference of two LIST<object> in c# using lambda expression
- Linq Select nested lists
- EF: Duplicate Object with all child including sub sub children (Deep Copy)
- How to efficiently duplicate a specific value in a list
- How can I Refactor This To Pass in the "Property to Use" in this Lambda to Make This Method Reusable?
- LINQ, can't join to string
- Remove results from a linq query depending on query text
- LINQ SQL query, SubmitChanges is not submitting changes to DB
- List Value to XML conversion using LINQ