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.
21 lines
496 B
21 lines
496 B
using System.Collections.Generic;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace contacts
|
|
{
|
|
public class PeopleContext : DbContext
|
|
{
|
|
public DbSet<Person> People { get; set; }
|
|
|
|
protected override void OnConfiguring(DbContextOptionsBuilder options)
|
|
=> options.UseSqlite("Data Source=people.db");
|
|
}
|
|
|
|
public class Person
|
|
{
|
|
public int PersonId { get; set; }
|
|
public string Name { get; set; }
|
|
public int Age { get; set; }
|
|
}
|
|
}
|