Search
 
SCRIPT & CODE EXAMPLE
 

SQL

services.AddDbContext DataSource Sqlite

-- Using AspNet.3.1 EntityFrameworkCode w Sqlite database
-- Add Context class
public class DatabaseContext : DbContext
{
    protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
    {
        optionsBuilder.UseSqlite("Filename=MyDatabase.db");
    }
}
 -- Add to Startup ConfigureServices
 	services.AddEntityFrameworkSqlite ().AddDbContext<DatabaseContext> ();
Comment

PREVIOUS NEXT
Code Example
Sql :: sqlite insert or update 
Sql :: sqlalchemy empty table 
Sql :: duplicate key value violates unique constraint in postgresql 
Sql :: sql server list database 
Sql :: activate binary log mariadb 
Sql :: SQL CASE With ELSE in SQL 
Sql :: athena create table 
Sql :: change column name mysql 
Sql :: PL SQL VARRAY of records 
Sql :: add not null constraint sql server 
Sql :: mariadb cast to int 
Sql :: mysql create user with grant privileges 
Sql :: select from select sql server 
Sql :: how to pass dynamic column name in sql query 
Sql :: create empty table from existing table 
Sql :: Using GROUP BY in MySQL Join Table 
Sql :: sqlite3 pragma foreign keys 
Sql :: postgres how to add field created at 
Sql :: mysql query to find duplicate records 
Sql :: if else in mysql stored procedure 
Sql :: sql order by two columns 
Sql :: between vs in sql 
Sql :: test sql query 
Sql :: mysql command 
Sql :: mysql limit order by 
Sql :: how covert into int in maria db 
Sql :: sql server: how to concatenate column data using comma 
Sql :: choose only one for each distinct collumn regardless of other columns 
Sql :: mysql if statement in where clause 
Sql :: mysql is odd 
ADD CONTENT
Topic
Content
Source link
Name
2+2 =