Add client-side Notes page with API integration and shared contracts
This commit is contained in:
10
Freman.Sample.Web.Contracts/CreateNoteRequest.cs
Normal file
10
Freman.Sample.Web.Contracts/CreateNoteRequest.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Freman.Sample.Web.Contracts;
|
||||
|
||||
public sealed class CreateNoteRequest
|
||||
{
|
||||
[Required]
|
||||
[StringLength(500)]
|
||||
public string Text { get; set; } = "";
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
3
Freman.Sample.Web.Contracts/NoteDto.cs
Normal file
3
Freman.Sample.Web.Contracts/NoteDto.cs
Normal file
@@ -0,0 +1,3 @@
|
||||
namespace Freman.Sample.Web.Contracts;
|
||||
|
||||
public sealed record NoteDto(int Id, string Text, DateTime CreatedUtc);
|
||||
Reference in New Issue
Block a user