First commit. Include junk from template to remove
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
using Hutopy.Domain.Entities;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
namespace Hutopy.Infrastructure.Data.Configurations;
|
||||
|
||||
public class TodoItemConfiguration : IEntityTypeConfiguration<TodoItem>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<TodoItem> builder)
|
||||
{
|
||||
builder.Property(t => t.Title)
|
||||
.HasMaxLength(200)
|
||||
.IsRequired();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using Hutopy.Domain.Entities;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
namespace Hutopy.Infrastructure.Data.Configurations;
|
||||
|
||||
public class TodoListConfiguration : IEntityTypeConfiguration<TodoList>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<TodoList> builder)
|
||||
{
|
||||
builder.Property(t => t.Title)
|
||||
.HasMaxLength(200)
|
||||
.IsRequired();
|
||||
|
||||
builder
|
||||
.OwnsOne(b => b.Colour);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user