score:3
select new
creates instances of a new anonymous type. The query creates a list of these and then you try to cast that to IList<BC_FeedbackBy>
. Create new instances of BC_FeedbackBy
in the query instead.
Something like
select new BC_FeedbackBy()
{
feedbackId =s.FeedbackById ,
feedbackName=s.FeedbackBy ,
})
Source: stackoverflow.com
Related Query
- query problem with linq: Unable to cast object
- Problem with LINQ to Entities query using Sum on child object property
- Linq to sql as object data source - designer problem with partial classes
- LINQ with String.Join() error: "System.InvalidCastException: Unable to cast object of type '<DistinctIterator>
- linq query getting Unable to cast object of type 'System.Boolean' to type 'System.String'
- Unable to cast object of type 'System.Double' to type 'System.String' linq query
- Unable to cast object of type 'System.Int32' to type 'System.String' in LINQ query
- Unable to cast object of type grouping to datarow after i grouped datatable with linq
- Linq query error - Unable to cast object of type 'V1.Controllers.Loan' to type 'System.IConvertible
- Problem with linq query
- How can I set properties on all items from a linq query with values from another object that is also pulled from a query?
- Linq to entities - SQL Query - Where list contains object with 2 properties (or more)
- Linq with where clause in many-to-many EF Code First object
- Unable to cast object of type System.Func`2 with Int64
- Unable to cast object of type 'System.Data.Entity.Infrastructure.DbQuery`1[]' using linq lambda expression
- Linq cast conversion Xelement error: Unable to cast object of type 'System.Xml.Linq.XElement' to type 'System.IConvertible'
- LINQ query on object with unknown class
- Unable to cast object of type 'WhereSelectListIterator` in LINQ
- LINQ Issue: Unable to cast object of type 'System.Reflection.Module' to type 'System.Reflection.Emit.ModuleBuilder
- Query for existence of an object with LINQ (to Entities)
- How can I speed up this linq query on a List<> with search criteria on 3 attributes in the list object
- Linq query performance with new object in `Where`
- unable to edit DataGridView populated with results of LINQ query
- Linq sub query when using a repository pattern with EF code first
- LINQ Query for An object with 2 collections
- LINQ query to filter list by object property with multiple checks
- how to query a sub object of an object with linq
- How to cast linq query to an object IEnumerable module class type?
- Removing duplicates using LINQ returns "Error removing duplicates: Unable to cast object of type 'System.Int32' to type 'System.String'."
- convert linq to object query to sql query (no linq to sql code or datacontext)
More Query from same tag
- Linq Query to Group By Multiple Columns But Get Additional Properties
- Building a Dynamic Linq Query using Equals and an Array
- Unable to query child types using marten and Linq
- Linq to SQL select returns list within an anonymous type
- Remove a parent based on child values
- How to Zip two Lists of different size to create a new list that is same as the size of the longest amongst the original lists?
- Sort 2 tables at the same time via using LinQ
- Comparing two string arrays in C#
- Is it possible to create anonymous type in LINQ extension methods in C#?
- Linq Min() of Non-zero values
- C# linq query to filter out only items of a specified type, that meet a specified condition
- How to make "select not in" clause using linq sql
- Passing in Func<T, bool> to LINQ Where
- LINQ: How to join on only a single row with the MAX ID of the join column, and not all rows?
- Linq Query syntax System.Xml.Linq.XElement
- Use ToDictionary to create a dictionary
- LINQ Right Outer Join Problem
- Best way to find if a value is present in the array, and if so execute code
- sqlLinq Take higher RN number
- Convert object collection to dictionary using LINQ
- LINQ query throws an InvalidCastException?
- How do I select individual fields in a Dynamic LINQ Select Statement?
- LINQ query to select object and count
- How to pass viewstate value to storedprocedure in asp.net using linq?
- Converting decimal from LINQ query to Currency
- How to query XElement with two namespaces
- LINQ group items. A single item may be in several groups
- ML.NET How can I get my IDataView from a linq query?
- Why doesn't C#'s overload resolution work between Func<T,T> and Action<T>?
- How do I sort on a column that isn't in the database with LINQ to entities?