Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>The code looks good:</p> <pre><code> var connection = factory.Create("mydb.sq;"); connection.CreateTable&lt;TableType&gt;(); </code></pre> <p>I don't think the <code>System.NotSupportedException: Don't know about Cirrious.MvvmCross.ViewModels.MvxRequestedBy</code> has anything to do with the SQLite code you've posted. I suspect that is coming from some other part of your startup code.</p> <p>If it helps, my standard SQLite sample code looks like:</p> <pre><code>public class Kitten { [PrimaryKey, AutoIncrement] public int Id { get; set; } public string Name { get; set; } public int Price { get; set; } public string ImageUrl { get; set; } } public class DataService { private readonly ISQLiteConnection _connection; public DataService(ISQLiteConnectionFactory factory) { _connection = factory.Create("kittens.sql"); _connection.CreateTable&lt;Kitten&gt;(); } public List&lt;Kitten&gt; KittensMatching(string nameFilter) { return _connection.Table&lt;Kitten&gt;() .OrderBy(x =&gt; x.Price) .Where(x =&gt; x.Name.Contains(nameFilter)) .ToList(); } // other db methods } </code></pre> <p>I will post a full repo and N+1 video for this soon - in the meantime, the demo I did at Evolve is on <a href="https://github.com/slodge/DemoFromEvolve" rel="nofollow">https://github.com/slodge/DemoFromEvolve</a> - it's slightly out of date in terms of nuget packages but the SQLite code in <a href="https://github.com/slodge/DemoFromEvolve/blob/master/Evolved.Core/Services/DataService.cs" rel="nofollow">DataService.cs</a> is up to date.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload