Initial checkin
This commit is contained in:
13
Models/TodoContext.cs
Normal file
13
Models/TodoContext.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace TodoApi.Models;
|
||||
|
||||
public class TodoContext : DbContext
|
||||
{
|
||||
public TodoContext(DbContextOptions<TodoContext> options)
|
||||
: base(options)
|
||||
{
|
||||
}
|
||||
|
||||
public DbSet<TodoItem> TodoItems { get; set; } = null!;
|
||||
}
|
||||
8
Models/TodoItem.cs
Normal file
8
Models/TodoItem.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace TodoApi.Models;
|
||||
|
||||
public class TodoItem
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public string? Name { get; set; }
|
||||
public bool IsComplete { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user