Base solution for your next web application
Open Closed

How to view SQLite database? #4694


User avatar
0
manojreddy created

I'm running test cases for creation, updation, deletion of Entities, But I cannot see Database entries to verify records. Is there any way to view SQLite DB?


3 Answer(s)
  • User Avatar
    0
    alper created
    Support Team

    it's a free tool <a class="postlink" href="http://sqlitebrowser.org/">http://sqlitebrowser.org/</a>

  • User Avatar
    0
    manojreddy created

    Does it work with the in-memory (default we have in abp framework) database?

    public static void Register(IIocManager iocManager)
    {
    	RegisterIdentity(iocManager);
    
    	var builder = new DbContextOptionsBuilder<MyCompanyDbContext>();
    
    	var inMemorySqlite = new SqliteConnection("Data Source=:memory:");
    	builder.UseSqlite(inMemorySqlite);
    
    	inMemorySqlite.Open();
    
    	iocManager.IocContainer.Register(
    		Component
    			.For<DbContextOptions<MyCompanyDbContext>>()
    			.Instance(builder.Options)
    			.LifestyleSingleton()
    	);
    
    	new MyCompanyDbContext(builder.Options).Database.EnsureCreated();
    }
    
  • User Avatar
    0
    alper created
    Support Team

    hi,

    sorry you cannot inspect a in-memory SQL database! because each process has its own virtual memory which is invisible from within other processes. further information read <a class="postlink" href="https://github.com/sqlitebrowser/sqlitebrowser/issues/455">https://github.com/sqlitebrowser/sqlite ... issues/455</a>