Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You...
I have the following code. I’m getting error: “The cast to value type ‘Int32’ failed because the materialized value is null. Either the result type’s generic parameter or the...
var items = from c in contacts select new ListItem { Value = c.ContactId, //Cannot implicitly convert type 'int' (ContactId) to 'string' (Value). Text = c.Name }; var items...
I know some differences of LINQ to Entities and LINQ to Objects which the first implements IQueryable and the second implements IEnumerable and my question scope is within EF...
Can someone please explain what a GroupJoin() is? How is it different from a regular Join()? Is it commonly used? Is it only for method syntax? What about query...
In using the EntityFramework, I get the error “A lambda expression with a statement body cannot be converted to an expression tree” when trying to compile the following code:...
In T-SQL you could have a query like: SELECT * FROM Users WHERE User_Rights IN ("Admin", "User", "Limited") How would you replicate that in a LINQ to Entities query?...
I have a stored procedure that has three parameters and I’ve been trying to use the following to return the results: context.Database.SqlQuery<myEntityType>("mySpName", param1, param2, param3); At first I tried...
I have a procedure in SQL that I am trying to turn into Linq: SELECT O.Id, O.Name as Organization FROM Organizations O JOIN OrganizationsHierarchy OH ON O.Id=OH.OrganizationsId where OH.Hierarchy...
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for Stack Overflow....