mirror of
https://git.tonybark.com/tonytins/bark.api.git
synced 2026-02-10 16:24:47 -05:00
Set up a new ASP.NET Core Web API project targeting .NET 10.0. Added basic Todo model, in-memory database context, and CRUD endpoints for Todo items based on tutorial. Included configuration files, launch settings, and .gitignore for Visual Studio and JetBrains IDEs.
14 lines
No EOL
302 B
C#
14 lines
No EOL
302 B
C#
namespace Bark.Api;
|
|
|
|
public class Todo {
|
|
public int Id { get; set; }
|
|
public string? Name { get; set; }
|
|
public bool IsCompleted { get; set; }
|
|
}
|
|
|
|
class TodoDb : DbContext
|
|
{
|
|
public TodoDb(DbContextOptions<TodoDb> options) : base(options) { }
|
|
|
|
public DbSet<Todo> Todos => Set<Todo>();
|
|
} |