score:17
Accepted answer
SQLite
does not support join via Linq
for now as far as I know. I had to use the query syntax like this:
var q = database.Query<MusicItems>(
@"select MI.Name, MI.ResId,
MI.Tension from MusicItems MI inner join MusicInThemes MT on
MI.ResId = MT.ResId where MT.ThemeId = ?",
ThemeID).ToList();
return q.Select(x => new Playlist { Name = x.Name, ResId = x.ResId, LoopStart = x.LoopStart });
score:4
use '@' symbol in front of query will make it look simple and more readable.
var musicFiles = database.Query<MusicItems>(@"select MI.Name, MI.ResId,
MI.Tension from MusicItems MI inner join MusicInThemes MT on
MI.ResId = MT.ResId where MT.ThemeId = ?",
ThemeID).ToList();
Source: stackoverflow.com
Related Query
- Join tables in SQLite.Net with LINQ on xamarin.android is not supported
- Can not join tables with LINQ
- Linq join on multpile columns with a where not equals condition and need to return columns from both tables
- How to join 3 tables with linq
- How to left join multiple tables with LINQ
- "the method join is not supported" with Tridion OData service & Linq
- LINQ to SQL and Join two tables with OR clause
- using linq with join using two where on two tables
- linq join 3 tables with or condition
- Queryable.Intersect() with SQLite and Linq not giving expected results
- Outer join with linq query in EF Core 3 not working
- Query expressions over source type 'dynamic' or with a join sequence of type 'dynamic' are not allowed
- Only parameterless constructors and initializers are supported in LINQ to Entities in linq join with tuples
- Problem with simple join by multiple columns in two tables using linq
- creating Linq to sqlite dbml from DbLinq source code
- How to use Linq to join entity tables with a cross-reference table
- Entity Framework: How to perform left join with EF and LINQ among multiple tables
- Queries with local collections are not supported LINQ
- Outer Join is not working in Linq Query: The method 'Join' cannot follow the method 'SelectMany' or is not supported
- Insert into multiple tables (one to one relationships) with Linq queries and SQLite
- C# Using Linq to join 2 tables with 2 same columns
- code first approach error: the specified type member 'yyyxx' is not supported in linq to entities
- Linq left join with multiple tables
- How to join two tables with Linq in an MVC controller
- LINQ - Join 3 tables with group by and sum
- Linq with reflexion error: Expression LINQ 'Invoke' node is not supported in LINQ to Entities
- What LINQ features are not supported with SubSonic 3?
- join two tables with multiple condition in linq
- LINQ Group by on multiple tables with nested group by with join and aggregate
- C# LINQ join 2 tables with where clause
More Query from same tag
- How to use DynamicLinq "contains” or “like” with numbers?
- How do I do this SELECT statement that uses column renaming (or column alias) with LINQ?
- LINQ Grouping or Splitting
- return a class directly from a linq query
- Multiple Select Linq Query
- Conditionally Populate Class Field in LINQ To Entities
- Convert to LINQ of a foreach iteration gives compilation error in VS Asp.Net 2019 .Net 4.8
- In linq to EF can I create a dynamic query to search on a field specified by the user
- Linq.js get subitems
- ef cf linq populate ignored property
- LINQ continue after Take
- Concatenate<T>(List<T> list, string specifiedPropertyOfT)?
- (complex?) LINQtoSQL query
- How to use orderby in mongodb if there are possible null values?
- Mix Items to new List with Linq
- Convert VB.NET Group By expression to C#
- Conditional Output by Linq to XML
- How to iterate a collection between two items?
- LINQ Error The type is not supported in aggregation operations
- Using List<Person> Distinct() to return 2 values
- How to split elements of the group in many lists?
- "InnerText" on XmlNode in LINQ query do not work
- Simplify Entity Framework Core query
- LINQ: Select a column based on another column value
- linq to entity query getting error
- Best way to obtain objects from a collection that can be cast to a specific type using Linq
- I Need to insert Exception details into sql server database
- need help in linq
- Whether to use AsEnumerable() in LINQ or not?
- How does a LINQ IEnumerable work under the hood?