You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
660 B
28 lines
660 B
using Microsoft.EntityFrameworkCore;
|
|
using System;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Storage;
|
|
|
|
namespace DbContextTest1
|
|
{
|
|
public class Test1
|
|
{
|
|
public Guid Id { get; set; }
|
|
public string TestField1 { get; set; }
|
|
}
|
|
public class DbContext1 : DbContext
|
|
{
|
|
|
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
|
{
|
|
optionsBuilder.UseSqlite("Data Source=data.db;");
|
|
}
|
|
|
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
|
{
|
|
modelBuilder.Entity<Test1>();
|
|
|
|
}
|
|
}
|
|
}
|