Backend/e-suite.Database.Core/e-suite.Database.Core.UnitTests/Helpers/Tables/TableWithKey.cs
2026-01-20 21:50:10 +00:00

25 lines
656 B
C#

using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace e_suite.Database.Core.UnitTests.Helpers.Tables;
[Table("TableWithKey", Schema = "StandAlone")]
public class TableWithKey
{
[Key]
public long Id { get; set; }
[Required] public int TotalTimeMS { get; set; }
public static void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<TableWithKey>()
.HasData(new TableWithKey
{
Id = 1,
TotalTimeMS = 2000
}
);
}
}