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.
iot/labs/EFCoreTest/DbContextTest2/DbContext2.cs

24 lines
561 B

using Microsoft.EntityFrameworkCore;
using System;
namespace DbContextTest2
{
public class Test2
{
public Guid Id { get; set; }
public string TestField1 { get; set; }
}
public class DbContext2 : DbContext
{
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
optionsBuilder.UseSqlite("Data Source=data.db;");
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<Test2>();
}
}
}