You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have followed your sample to a T and the app builds, launches, dnconection is made, AppDbContext created/instantiated, passes through to the VMs etc. All that seems to be ok.
But when I try a basic operation like List items = await context.TodoItems.ToListAsync(cancellationToken);
I get an error citing "no such table".
I've tried with inheriting either DbContext(options) or OfflineDbContext(options) as per your documentation and looked through all code but cannot see where it would actually CREATE the table.
public class AppDbContext(DbContextOptions<AppDbContext> options) : DbContext(options) // OfflineDbContext(options)
{
public DbSet<TodoItem> TodoItems => Set<TodoItem>();
...
}
I know with SQLLite we need to do something LIKE this var result = await Database.CreateTableAsync<TodoItem>();
OR is this line in the AppDbContext supposed to set the base class to create the table? public DbSet<TodoItem> TodoItems => Set<TodoItem>();
This ought to be a quick fix if I'm missing something...
thanks for any help.
The text was updated successfully, but these errors were encountered:
Hello,
I have followed your sample to a T and the app builds, launches, dnconection is made, AppDbContext created/instantiated, passes through to the VMs etc. All that seems to be ok.
But when I try a basic operation like List items = await context.TodoItems.ToListAsync(cancellationToken);
I get an error citing "no such table".
I've tried with inheriting either DbContext(options) or OfflineDbContext(options) as per your documentation and looked through all code but cannot see where it would actually CREATE the table.
I know with SQLLite we need to do something LIKE this
var result = await Database.CreateTableAsync<TodoItem>();
OR is this line in the AppDbContext supposed to set the base class to create the table?
public DbSet<TodoItem> TodoItems => Set<TodoItem>();
This ought to be a quick fix if I'm missing something...
thanks for any help.
The text was updated successfully, but these errors were encountered: