score:5
Accepted answer
int numvalue = int32.parse(value);
var userdetails = context.tbl_members
.where(d => d.mobile == value || d.memberid == numvalue)
.singleordefault();
Source: stackoverflow.com
Related Query
- LINQ OR operator not giving result
- LINQ Multiple table left join, distinct count not giving proper result
- How to execute an operator on the result of a linq subquery only when the result is not null?
- What's your favorite LINQ to Objects operator which is not built-in?
- C# 6 null conditional operator does not work for LINQ query
- why is this linq query return a boolean and not the first result of the select?
- How to write not equal operator in linq to sql?
- Result of LINQ Query in MVC SelectList as Value and Text - not working
- foreach in linq result not working
- The LastResultOperator result operator is not current supported
- LINQ anonymous type not giving the list I need
- Linq Expressions: The binary operator Equal is not defined for the types 'MyEnum' and 'System.Enum'
- ?: Conditional Operator in LINQ not working as expected
- OrderBy().ThenBy().ThenBy() not giving expected result on a List of entities
- Queryable.Intersect() with SQLite and Linq not giving expected results
- Linq Query With Multiple Joins Not Giving Correct Results
- Linq result Int error: Specified cast is not valid
- LIKE operator in FromSqlInterpolated/FromSqlRaw not working, but fluent API or LINQ expressions do
- linq Any operator with not equal(!=)
- Ternary operator in LINQ query is not working as expected
- Linq to entity, using sql not in operator
- LINQ query not returning desired result as string. Why?
- Adding Nodes to Tree via LINQ creates "query operator not supported" during runtime
- LINQ query not returning the correct result
- Linq - using not "IN" operator to select non duplicated lines from a text file
- LINQ - Result not null if querying a nonexistent element
- Using NOT operator with AddressOf in a LINQ Where
- Not equal for linq operator in vb.net
- Linq to entities does not know what .Date operator is
- With LINQ how do you return a string const in the result from the select operator
More Query from same tag
- Reading XML nodes attribute as per user input
- C#: Mapping a database to class properties when DB names and column names will only be known at run time
- Linq IList<T> hide data and bind to gridview
- Entity Framework Query based on child object filter and at the same time on the main object
- How to replace null with Empty string in Expressions.Expression in c# Linq
- Finding location in list,
- Linq-to-sql query group by while still selecting details
- How to make a C# 'grep' more Functional using LINQ?
- How to check for null attributes in LinqToXML expressions?
- Use type to access properties instead of concrete instance
- Count number of entries?
- How to code this LINQ query in a better way
- Using an expression tree to generate a select statement with a sum after a group by C#
- left join in Linq query
- Cannot return type IQueryable or IEnumerable
- Convert XML to C# Dictionary
- Join and Calculate Average of column using LINQ to sql
- Can't figure out how to use JqGrid correctly with Asp.net MVC and Linq to Sql
- Linq based filtering for the class based on the list values
- Trying to do this but with no success. P'se help me with this Little issue
- Add Collection to End of IOrderedEnumerable
- What is the "=>" sign in LINQ queries?
- Save LINQ Query As Variable To Call Another LINQ Query
- What caused this InvalidOperationException using LINQ to SQL?
- How to apply between clause on two columns in Linq query while searching from datatable C#?
- How to mock an object that does a complicated entity framework LINQ query?
- Easiest way to get "next" element in a sequence?
- Indexing inner class in ravendb
- How does the Where method run?
- Converting SQL to LINQ With Sub Query