Lagt till nya entiteter för Gameround och GamePoints

Migrerat och byggt ut databasen
This commit is contained in:
2025-09-03 23:38:57 +02:00
parent ddb6719587
commit 4caeb21b0d
29 changed files with 1288 additions and 56 deletions

View File

@ -24,7 +24,7 @@ public class GamePointRepository : IRepository<GamePoint>
public async Task<bool> Save(GamePoint entity) public async Task<bool> Save(GamePoint entity)
{ {
var res = false; var res = false;
if ((entity.GameHeatRegNr == 0) if ((entity.GameRoundRegNr == 0)
|| (entity.GameRegPoints == 0)) || (entity.GameRegPoints == 0))
{ {
return res; // Validation failed return res; // Validation failed

View File

@ -0,0 +1,61 @@
using Common.Library;
using GreadyPoang.DataLayer.Database;
using GreadyPoang.EntityLayer;
using Microsoft.EntityFrameworkCore;
namespace GreadyPoang.DataLayer;
public class GameRoundRepository : IRepository<GameRound>
{
private readonly DataContext _dataContext;
public GameRoundRepository(DataContext dataContext)
{
_dataContext = dataContext;
}
public bool Delete(GameRound entity)
{
var res = false;
try
{
_dataContext.GameRounds.Remove(entity);
_dataContext.SaveChanges();
res = true;
}
catch (Exception ex)
{
System.Diagnostics.Debug.WriteLine($"Error deleting GameRound: {ex.Message}");
res = false;
}
return res;
}
public async Task<IEnumerable<GameRound>> Get()
{
return await _dataContext.GameRounds.ToListAsync();
}
public async Task<GameRound?> Get(int id)
{
return await _dataContext.GameRounds.FindAsync(id);
}
public async Task<bool> Save(GameRound entity)
{
var res = false;
if (entity.GameRoundId == 0)
{
_dataContext.GameRounds.Add(entity);
await _dataContext.SaveChangesAsync();
res = true;
}
else
{
_dataContext.GameRounds.Update(entity);
await _dataContext.SaveChangesAsync();
res = true;
}
return res;
}
}

View File

@ -12,6 +12,7 @@ public class DataContext : DbContext
//public DbSet<User> Users => Set<User>(); //public DbSet<User> Users => Set<User>();
public DbSet<Participant> Participants { get; set; } public DbSet<Participant> Participants { get; set; }
public DbSet<GamePoint> GamePoints { get; set; } public DbSet<GamePoint> GamePoints { get; set; }
public DbSet<GameRound> GameRounds { get; set; }
protected override void OnModelCreating(ModelBuilder modelBuilder) protected override void OnModelCreating(ModelBuilder modelBuilder)
{ {
@ -21,12 +22,18 @@ public class DataContext : DbContext
new Participant { ParticipantId = 2, FirstName = "Jane", LastName = "Black", Email = "jb@gmail.com" }, new Participant { ParticipantId = 2, FirstName = "Jane", LastName = "Black", Email = "jb@gmail.com" },
new Participant { ParticipantId = 3, FirstName = "Mary", LastName = "White", Email = "mw@gmail.com" } new Participant { ParticipantId = 3, FirstName = "Mary", LastName = "White", Email = "mw@gmail.com" }
); );
modelBuilder.Entity<GamePoint>().HasData( modelBuilder.Entity<GameRound>().HasData(
new GamePoint { GamePointId = 1, ParticipantId = 1, GameHeatId = 0, GameDate = new DateTime(2025, 10, 15, 20, 10, 15), GameHeatRegNr = 1, GameRegPoints = 1050 }, new GameRound { GameRoundId = 1, GameRoundStartDate = new DateTime(2025, 10, 15, 19, 10, 15), GameRoundFinished = DateTime.MinValue },
new GamePoint { GamePointId = 2, ParticipantId = 1, GameHeatId = 0, GameDate = new DateTime(2025, 10, 15, 20, 15, 15), GameHeatRegNr = 3, GameRegPoints = 350 }, new GameRound { GameRoundId = 2, GameRoundStartDate = new DateTime(2025, 09, 15, 19, 10, 15), GameRoundFinished = DateTime.MinValue },
new GamePoint { GamePointId = 3, ParticipantId = 3, GameHeatId = 0, GameDate = new DateTime(2025, 10, 15, 20, 12, 15), GameHeatRegNr = 2, GameRegPoints = 1000 }, new GameRound { GameRoundId = 3, GameRoundStartDate = new DateTime(2025, 09, 20, 19, 10, 15), GameRoundFinished = DateTime.MinValue }
new GamePoint { GamePointId = 4, ParticipantId = 3, GameHeatId = 0, GameDate = new DateTime(2025, 10, 15, 20, 20, 15), GameHeatRegNr = 4, GameRegPoints = 400 }
); );
modelBuilder.Entity<GamePoint>().HasData(
new GamePoint { GamePointId = 1, ParticipantId = 1, GameRoundId = 2, GameDate = new DateTime(2025, 10, 15, 20, 10, 15), GameRoundRegNr = 1, GameRegPoints = 1050, PointStatus = GamePointStatus.New },
new GamePoint { GamePointId = 2, ParticipantId = 1, GameRoundId = 2, GameDate = new DateTime(2025, 10, 15, 20, 15, 15), GameRoundRegNr = 3, GameRegPoints = 350, PointStatus = GamePointStatus.New },
new GamePoint { GamePointId = 3, ParticipantId = 3, GameRoundId = 2, GameDate = new DateTime(2025, 10, 15, 20, 12, 15), GameRoundRegNr = 2, GameRegPoints = 1000, PointStatus = GamePointStatus.New },
new GamePoint { GamePointId = 4, ParticipantId = 3, GameRoundId = 2, GameDate = new DateTime(2025, 10, 15, 20, 20, 15), GameRoundRegNr = 4, GameRegPoints = 400, PointStatus = GamePointStatus.New }
);
} }
} }

View File

@ -0,0 +1,135 @@
// <auto-generated />
using System;
using GreadyPoang.DataLayer.Database;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace GreadyPoang.DataLayer.Migrations
{
[DbContext(typeof(DataContext))]
[Migration("20250903062957_FixHeatToRoundParameter")]
partial class FixHeatToRoundParameter
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "9.0.8");
modelBuilder.Entity("GreadyPoang.EntityLayer.GamePoint", b =>
{
b.Property<int>("GamePointId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<DateTime>("GameDate")
.HasColumnType("TEXT");
b.Property<int>("GameHeatId")
.HasColumnType("INTEGER");
b.Property<int>("GameHeatRegNr")
.HasColumnType("INTEGER");
b.Property<int>("GameRegPoints")
.HasColumnType("INTEGER");
b.Property<int>("ParticipantId")
.HasColumnType("INTEGER");
b.HasKey("GamePointId");
b.ToTable("GamePoints");
b.HasData(
new
{
GamePointId = 1,
GameDate = new DateTime(2025, 10, 15, 20, 10, 15, 0, DateTimeKind.Unspecified),
GameHeatId = 0,
GameHeatRegNr = 1,
GameRegPoints = 1050,
ParticipantId = 1
},
new
{
GamePointId = 2,
GameDate = new DateTime(2025, 10, 15, 20, 15, 15, 0, DateTimeKind.Unspecified),
GameHeatId = 0,
GameHeatRegNr = 3,
GameRegPoints = 350,
ParticipantId = 1
},
new
{
GamePointId = 3,
GameDate = new DateTime(2025, 10, 15, 20, 12, 15, 0, DateTimeKind.Unspecified),
GameHeatId = 0,
GameHeatRegNr = 2,
GameRegPoints = 1000,
ParticipantId = 3
},
new
{
GamePointId = 4,
GameDate = new DateTime(2025, 10, 15, 20, 20, 15, 0, DateTimeKind.Unspecified),
GameHeatId = 0,
GameHeatRegNr = 4,
GameRegPoints = 400,
ParticipantId = 3
});
});
modelBuilder.Entity("GreadyPoang.EntityLayer.Participant", b =>
{
b.Property<int>("ParticipantId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("Email")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("FirstName")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("LastName")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("ParticipantId");
b.ToTable("Participants");
b.HasData(
new
{
ParticipantId = 1,
Email = "John.Doe@gmail.com",
FirstName = "John",
LastName = "Doe"
},
new
{
ParticipantId = 2,
Email = "jb@gmail.com",
FirstName = "Jane",
LastName = "Black"
},
new
{
ParticipantId = 3,
Email = "mw@gmail.com",
FirstName = "Mary",
LastName = "White"
});
});
#pragma warning restore 612, 618
}
}
}

View File

@ -0,0 +1,22 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace GreadyPoang.DataLayer.Migrations
{
/// <inheritdoc />
public partial class FixHeatToRoundParameter : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
}
}
}

View File

@ -0,0 +1,135 @@
// <auto-generated />
using System;
using GreadyPoang.DataLayer.Database;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace GreadyPoang.DataLayer.Migrations
{
[DbContext(typeof(DataContext))]
[Migration("20250903070200_FixHeatToRoundParams")]
partial class FixHeatToRoundParams
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "9.0.8");
modelBuilder.Entity("GreadyPoang.EntityLayer.GamePoint", b =>
{
b.Property<int>("GamePointId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<DateTime>("GameDate")
.HasColumnType("TEXT");
b.Property<int>("GameRegPoints")
.HasColumnType("INTEGER");
b.Property<int>("GameRoundId")
.HasColumnType("INTEGER");
b.Property<int>("GameRoundRegNr")
.HasColumnType("INTEGER");
b.Property<int>("ParticipantId")
.HasColumnType("INTEGER");
b.HasKey("GamePointId");
b.ToTable("GamePoints");
b.HasData(
new
{
GamePointId = 1,
GameDate = new DateTime(2025, 10, 15, 20, 10, 15, 0, DateTimeKind.Unspecified),
GameRegPoints = 1050,
GameRoundId = 0,
GameRoundRegNr = 1,
ParticipantId = 1
},
new
{
GamePointId = 2,
GameDate = new DateTime(2025, 10, 15, 20, 15, 15, 0, DateTimeKind.Unspecified),
GameRegPoints = 350,
GameRoundId = 0,
GameRoundRegNr = 3,
ParticipantId = 1
},
new
{
GamePointId = 3,
GameDate = new DateTime(2025, 10, 15, 20, 12, 15, 0, DateTimeKind.Unspecified),
GameRegPoints = 1000,
GameRoundId = 0,
GameRoundRegNr = 2,
ParticipantId = 3
},
new
{
GamePointId = 4,
GameDate = new DateTime(2025, 10, 15, 20, 20, 15, 0, DateTimeKind.Unspecified),
GameRegPoints = 400,
GameRoundId = 0,
GameRoundRegNr = 4,
ParticipantId = 3
});
});
modelBuilder.Entity("GreadyPoang.EntityLayer.Participant", b =>
{
b.Property<int>("ParticipantId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("Email")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("FirstName")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("LastName")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("ParticipantId");
b.ToTable("Participants");
b.HasData(
new
{
ParticipantId = 1,
Email = "John.Doe@gmail.com",
FirstName = "John",
LastName = "Doe"
},
new
{
ParticipantId = 2,
Email = "jb@gmail.com",
FirstName = "Jane",
LastName = "Black"
},
new
{
ParticipantId = 3,
Email = "mw@gmail.com",
FirstName = "Mary",
LastName = "White"
});
});
#pragma warning restore 612, 618
}
}
}

View File

@ -0,0 +1,38 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace GreadyPoang.DataLayer.Migrations
{
/// <inheritdoc />
public partial class FixHeatToRoundParams : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.RenameColumn(
name: "GameHeatRegNr",
table: "GamePoints",
newName: "GameRoundRegNr");
migrationBuilder.RenameColumn(
name: "GameHeatId",
table: "GamePoints",
newName: "GameRoundId");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.RenameColumn(
name: "GameRoundRegNr",
table: "GamePoints",
newName: "GameHeatRegNr");
migrationBuilder.RenameColumn(
name: "GameRoundId",
table: "GamePoints",
newName: "GameHeatId");
}
}
}

View File

@ -0,0 +1,135 @@
// <auto-generated />
using System;
using GreadyPoang.DataLayer.Database;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace GreadyPoang.DataLayer.Migrations
{
[DbContext(typeof(DataContext))]
[Migration("20250903074537_AddedStatusEnum")]
partial class AddedStatusEnum
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "9.0.8");
modelBuilder.Entity("GreadyPoang.EntityLayer.GamePoint", b =>
{
b.Property<int>("GamePointId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<DateTime>("GameDate")
.HasColumnType("TEXT");
b.Property<int>("GameRegPoints")
.HasColumnType("INTEGER");
b.Property<int>("GameRoundId")
.HasColumnType("INTEGER");
b.Property<int>("GameRoundRegNr")
.HasColumnType("INTEGER");
b.Property<int>("ParticipantId")
.HasColumnType("INTEGER");
b.HasKey("GamePointId");
b.ToTable("GamePoints");
b.HasData(
new
{
GamePointId = 1,
GameDate = new DateTime(2025, 10, 15, 20, 10, 15, 0, DateTimeKind.Unspecified),
GameRegPoints = 1050,
GameRoundId = 0,
GameRoundRegNr = 1,
ParticipantId = 1
},
new
{
GamePointId = 2,
GameDate = new DateTime(2025, 10, 15, 20, 15, 15, 0, DateTimeKind.Unspecified),
GameRegPoints = 350,
GameRoundId = 0,
GameRoundRegNr = 3,
ParticipantId = 1
},
new
{
GamePointId = 3,
GameDate = new DateTime(2025, 10, 15, 20, 12, 15, 0, DateTimeKind.Unspecified),
GameRegPoints = 1000,
GameRoundId = 0,
GameRoundRegNr = 2,
ParticipantId = 3
},
new
{
GamePointId = 4,
GameDate = new DateTime(2025, 10, 15, 20, 20, 15, 0, DateTimeKind.Unspecified),
GameRegPoints = 400,
GameRoundId = 0,
GameRoundRegNr = 4,
ParticipantId = 3
});
});
modelBuilder.Entity("GreadyPoang.EntityLayer.Participant", b =>
{
b.Property<int>("ParticipantId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("Email")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("FirstName")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("LastName")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("ParticipantId");
b.ToTable("Participants");
b.HasData(
new
{
ParticipantId = 1,
Email = "John.Doe@gmail.com",
FirstName = "John",
LastName = "Doe"
},
new
{
ParticipantId = 2,
Email = "jb@gmail.com",
FirstName = "Jane",
LastName = "Black"
},
new
{
ParticipantId = 3,
Email = "mw@gmail.com",
FirstName = "Mary",
LastName = "White"
});
});
#pragma warning restore 612, 618
}
}
}

View File

@ -0,0 +1,22 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace GreadyPoang.DataLayer.Migrations
{
/// <inheritdoc />
public partial class AddedStatusEnum : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
}
}
}

View File

@ -0,0 +1,179 @@
// <auto-generated />
using System;
using GreadyPoang.DataLayer.Database;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace GreadyPoang.DataLayer.Migrations
{
[DbContext(typeof(DataContext))]
[Migration("20250903195147_AddedTableGameRounds")]
partial class AddedTableGameRounds
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "9.0.8");
modelBuilder.Entity("GreadyPoang.EntityLayer.GamePoint", b =>
{
b.Property<int>("GamePointId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<DateTime>("GameDate")
.HasColumnType("TEXT");
b.Property<int>("GameRegPoints")
.HasColumnType("INTEGER");
b.Property<int>("GameRoundId")
.HasColumnType("INTEGER");
b.Property<int>("GameRoundRegNr")
.HasColumnType("INTEGER");
b.Property<int>("ParticipantId")
.HasColumnType("INTEGER");
b.Property<int>("PointStatus")
.HasColumnType("INTEGER");
b.HasKey("GamePointId");
b.ToTable("GamePoints");
b.HasData(
new
{
GamePointId = 1,
GameDate = new DateTime(2025, 10, 15, 20, 10, 15, 0, DateTimeKind.Unspecified),
GameRegPoints = 1050,
GameRoundId = 2,
GameRoundRegNr = 1,
ParticipantId = 1,
PointStatus = 0
},
new
{
GamePointId = 2,
GameDate = new DateTime(2025, 10, 15, 20, 15, 15, 0, DateTimeKind.Unspecified),
GameRegPoints = 350,
GameRoundId = 2,
GameRoundRegNr = 3,
ParticipantId = 1,
PointStatus = 0
},
new
{
GamePointId = 3,
GameDate = new DateTime(2025, 10, 15, 20, 12, 15, 0, DateTimeKind.Unspecified),
GameRegPoints = 1000,
GameRoundId = 2,
GameRoundRegNr = 2,
ParticipantId = 3,
PointStatus = 0
},
new
{
GamePointId = 4,
GameDate = new DateTime(2025, 10, 15, 20, 20, 15, 0, DateTimeKind.Unspecified),
GameRegPoints = 400,
GameRoundId = 2,
GameRoundRegNr = 4,
ParticipantId = 3,
PointStatus = 0
});
});
modelBuilder.Entity("GreadyPoang.EntityLayer.GameRound", b =>
{
b.Property<int>("GameRoundId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<DateTime?>("GameRoundFinished")
.HasColumnType("TEXT");
b.Property<DateTime>("GameRoundStartDate")
.HasColumnType("TEXT");
b.HasKey("GameRoundId");
b.ToTable("GameRounds");
b.HasData(
new
{
GameRoundId = 1,
GameRoundFinished = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
GameRoundStartDate = new DateTime(2025, 10, 15, 19, 10, 15, 0, DateTimeKind.Unspecified)
},
new
{
GameRoundId = 2,
GameRoundFinished = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
GameRoundStartDate = new DateTime(2025, 9, 15, 19, 10, 15, 0, DateTimeKind.Unspecified)
},
new
{
GameRoundId = 3,
GameRoundFinished = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
GameRoundStartDate = new DateTime(2025, 9, 20, 19, 10, 15, 0, DateTimeKind.Unspecified)
});
});
modelBuilder.Entity("GreadyPoang.EntityLayer.Participant", b =>
{
b.Property<int>("ParticipantId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("Email")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("FirstName")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("LastName")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("ParticipantId");
b.ToTable("Participants");
b.HasData(
new
{
ParticipantId = 1,
Email = "John.Doe@gmail.com",
FirstName = "John",
LastName = "Doe"
},
new
{
ParticipantId = 2,
Email = "jb@gmail.com",
FirstName = "Jane",
LastName = "Black"
},
new
{
ParticipantId = 3,
Email = "mw@gmail.com",
FirstName = "Mary",
LastName = "White"
});
});
#pragma warning restore 612, 618
}
}
}

View File

@ -0,0 +1,115 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
namespace GreadyPoang.DataLayer.Migrations
{
/// <inheritdoc />
public partial class AddedTableGameRounds : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<int>(
name: "PointStatus",
table: "GamePoints",
type: "INTEGER",
nullable: false,
defaultValue: 0);
migrationBuilder.CreateTable(
name: "GameRounds",
columns: table => new
{
GameRoundId = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
GameRoundFinished = table.Column<DateTime>(type: "TEXT", nullable: true),
GameRoundStartDate = table.Column<DateTime>(type: "TEXT", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_GameRounds", x => x.GameRoundId);
});
migrationBuilder.UpdateData(
table: "GamePoints",
keyColumn: "GamePointId",
keyValue: 1,
columns: new[] { "GameRoundId", "PointStatus" },
values: new object[] { 2, 0 });
migrationBuilder.UpdateData(
table: "GamePoints",
keyColumn: "GamePointId",
keyValue: 2,
columns: new[] { "GameRoundId", "PointStatus" },
values: new object[] { 2, 0 });
migrationBuilder.UpdateData(
table: "GamePoints",
keyColumn: "GamePointId",
keyValue: 3,
columns: new[] { "GameRoundId", "PointStatus" },
values: new object[] { 2, 0 });
migrationBuilder.UpdateData(
table: "GamePoints",
keyColumn: "GamePointId",
keyValue: 4,
columns: new[] { "GameRoundId", "PointStatus" },
values: new object[] { 2, 0 });
migrationBuilder.InsertData(
table: "GameRounds",
columns: new[] { "GameRoundId", "GameRoundFinished", "GameRoundStartDate" },
values: new object[,]
{
{ 1, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new DateTime(2025, 10, 15, 19, 10, 15, 0, DateTimeKind.Unspecified) },
{ 2, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new DateTime(2025, 9, 15, 19, 10, 15, 0, DateTimeKind.Unspecified) },
{ 3, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new DateTime(2025, 9, 20, 19, 10, 15, 0, DateTimeKind.Unspecified) }
});
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "GameRounds");
migrationBuilder.DropColumn(
name: "PointStatus",
table: "GamePoints");
migrationBuilder.UpdateData(
table: "GamePoints",
keyColumn: "GamePointId",
keyValue: 1,
column: "GameRoundId",
value: 0);
migrationBuilder.UpdateData(
table: "GamePoints",
keyColumn: "GamePointId",
keyValue: 2,
column: "GameRoundId",
value: 0);
migrationBuilder.UpdateData(
table: "GamePoints",
keyColumn: "GamePointId",
keyValue: 3,
column: "GameRoundId",
value: 0);
migrationBuilder.UpdateData(
table: "GamePoints",
keyColumn: "GamePointId",
keyValue: 4,
column: "GameRoundId",
value: 0);
}
}
}

View File

@ -0,0 +1,179 @@
// <auto-generated />
using System;
using GreadyPoang.DataLayer.Database;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace GreadyPoang.DataLayer.Migrations
{
[DbContext(typeof(DataContext))]
[Migration("20250903195935_ChangedUpdateOrderInSeeding")]
partial class ChangedUpdateOrderInSeeding
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "9.0.8");
modelBuilder.Entity("GreadyPoang.EntityLayer.GamePoint", b =>
{
b.Property<int>("GamePointId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<DateTime>("GameDate")
.HasColumnType("TEXT");
b.Property<int>("GameRegPoints")
.HasColumnType("INTEGER");
b.Property<int>("GameRoundId")
.HasColumnType("INTEGER");
b.Property<int>("GameRoundRegNr")
.HasColumnType("INTEGER");
b.Property<int>("ParticipantId")
.HasColumnType("INTEGER");
b.Property<int>("PointStatus")
.HasColumnType("INTEGER");
b.HasKey("GamePointId");
b.ToTable("GamePoints");
b.HasData(
new
{
GamePointId = 1,
GameDate = new DateTime(2025, 10, 15, 20, 10, 15, 0, DateTimeKind.Unspecified),
GameRegPoints = 1050,
GameRoundId = 2,
GameRoundRegNr = 1,
ParticipantId = 1,
PointStatus = 0
},
new
{
GamePointId = 2,
GameDate = new DateTime(2025, 10, 15, 20, 15, 15, 0, DateTimeKind.Unspecified),
GameRegPoints = 350,
GameRoundId = 2,
GameRoundRegNr = 3,
ParticipantId = 1,
PointStatus = 0
},
new
{
GamePointId = 3,
GameDate = new DateTime(2025, 10, 15, 20, 12, 15, 0, DateTimeKind.Unspecified),
GameRegPoints = 1000,
GameRoundId = 2,
GameRoundRegNr = 2,
ParticipantId = 3,
PointStatus = 0
},
new
{
GamePointId = 4,
GameDate = new DateTime(2025, 10, 15, 20, 20, 15, 0, DateTimeKind.Unspecified),
GameRegPoints = 400,
GameRoundId = 2,
GameRoundRegNr = 4,
ParticipantId = 3,
PointStatus = 0
});
});
modelBuilder.Entity("GreadyPoang.EntityLayer.GameRound", b =>
{
b.Property<int>("GameRoundId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<DateTime?>("GameRoundFinished")
.HasColumnType("TEXT");
b.Property<DateTime>("GameRoundStartDate")
.HasColumnType("TEXT");
b.HasKey("GameRoundId");
b.ToTable("GameRounds");
b.HasData(
new
{
GameRoundId = 1,
GameRoundFinished = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
GameRoundStartDate = new DateTime(2025, 10, 15, 19, 10, 15, 0, DateTimeKind.Unspecified)
},
new
{
GameRoundId = 2,
GameRoundFinished = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
GameRoundStartDate = new DateTime(2025, 9, 15, 19, 10, 15, 0, DateTimeKind.Unspecified)
},
new
{
GameRoundId = 3,
GameRoundFinished = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
GameRoundStartDate = new DateTime(2025, 9, 20, 19, 10, 15, 0, DateTimeKind.Unspecified)
});
});
modelBuilder.Entity("GreadyPoang.EntityLayer.Participant", b =>
{
b.Property<int>("ParticipantId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("Email")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("FirstName")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("LastName")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("ParticipantId");
b.ToTable("Participants");
b.HasData(
new
{
ParticipantId = 1,
Email = "John.Doe@gmail.com",
FirstName = "John",
LastName = "Doe"
},
new
{
ParticipantId = 2,
Email = "jb@gmail.com",
FirstName = "Jane",
LastName = "Black"
},
new
{
ParticipantId = 3,
Email = "mw@gmail.com",
FirstName = "Mary",
LastName = "White"
});
});
#pragma warning restore 612, 618
}
}
}

View File

@ -0,0 +1,22 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace GreadyPoang.DataLayer.Migrations
{
/// <inheritdoc />
public partial class ChangedUpdateOrderInSeeding : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
}
}
}

View File

@ -26,18 +26,21 @@ namespace GreadyPoang.DataLayer.Migrations
b.Property<DateTime>("GameDate") b.Property<DateTime>("GameDate")
.HasColumnType("TEXT"); .HasColumnType("TEXT");
b.Property<int>("GameHeatId")
.HasColumnType("INTEGER");
b.Property<int>("GameHeatRegNr")
.HasColumnType("INTEGER");
b.Property<int>("GameRegPoints") b.Property<int>("GameRegPoints")
.HasColumnType("INTEGER"); .HasColumnType("INTEGER");
b.Property<int>("GameRoundId")
.HasColumnType("INTEGER");
b.Property<int>("GameRoundRegNr")
.HasColumnType("INTEGER");
b.Property<int>("ParticipantId") b.Property<int>("ParticipantId")
.HasColumnType("INTEGER"); .HasColumnType("INTEGER");
b.Property<int>("PointStatus")
.HasColumnType("INTEGER");
b.HasKey("GamePointId"); b.HasKey("GamePointId");
b.ToTable("GamePoints"); b.ToTable("GamePoints");
@ -47,37 +50,78 @@ namespace GreadyPoang.DataLayer.Migrations
{ {
GamePointId = 1, GamePointId = 1,
GameDate = new DateTime(2025, 10, 15, 20, 10, 15, 0, DateTimeKind.Unspecified), GameDate = new DateTime(2025, 10, 15, 20, 10, 15, 0, DateTimeKind.Unspecified),
GameHeatId = 0,
GameHeatRegNr = 1,
GameRegPoints = 1050, GameRegPoints = 1050,
ParticipantId = 1 GameRoundId = 2,
GameRoundRegNr = 1,
ParticipantId = 1,
PointStatus = 0
}, },
new new
{ {
GamePointId = 2, GamePointId = 2,
GameDate = new DateTime(2025, 10, 15, 20, 15, 15, 0, DateTimeKind.Unspecified), GameDate = new DateTime(2025, 10, 15, 20, 15, 15, 0, DateTimeKind.Unspecified),
GameHeatId = 0,
GameHeatRegNr = 3,
GameRegPoints = 350, GameRegPoints = 350,
ParticipantId = 1 GameRoundId = 2,
GameRoundRegNr = 3,
ParticipantId = 1,
PointStatus = 0
}, },
new new
{ {
GamePointId = 3, GamePointId = 3,
GameDate = new DateTime(2025, 10, 15, 20, 12, 15, 0, DateTimeKind.Unspecified), GameDate = new DateTime(2025, 10, 15, 20, 12, 15, 0, DateTimeKind.Unspecified),
GameHeatId = 0,
GameHeatRegNr = 2,
GameRegPoints = 1000, GameRegPoints = 1000,
ParticipantId = 3 GameRoundId = 2,
GameRoundRegNr = 2,
ParticipantId = 3,
PointStatus = 0
}, },
new new
{ {
GamePointId = 4, GamePointId = 4,
GameDate = new DateTime(2025, 10, 15, 20, 20, 15, 0, DateTimeKind.Unspecified), GameDate = new DateTime(2025, 10, 15, 20, 20, 15, 0, DateTimeKind.Unspecified),
GameHeatId = 0,
GameHeatRegNr = 4,
GameRegPoints = 400, GameRegPoints = 400,
ParticipantId = 3 GameRoundId = 2,
GameRoundRegNr = 4,
ParticipantId = 3,
PointStatus = 0
});
});
modelBuilder.Entity("GreadyPoang.EntityLayer.GameRound", b =>
{
b.Property<int>("GameRoundId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<DateTime?>("GameRoundFinished")
.HasColumnType("TEXT");
b.Property<DateTime>("GameRoundStartDate")
.HasColumnType("TEXT");
b.HasKey("GameRoundId");
b.ToTable("GameRounds");
b.HasData(
new
{
GameRoundId = 1,
GameRoundFinished = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
GameRoundStartDate = new DateTime(2025, 10, 15, 19, 10, 15, 0, DateTimeKind.Unspecified)
},
new
{
GameRoundId = 2,
GameRoundFinished = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
GameRoundStartDate = new DateTime(2025, 9, 15, 19, 10, 15, 0, DateTimeKind.Unspecified)
},
new
{
GameRoundId = 3,
GameRoundFinished = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
GameRoundStartDate = new DateTime(2025, 9, 20, 19, 10, 15, 0, DateTimeKind.Unspecified)
}); });
}); });

View File

@ -9,18 +9,20 @@ public class GamePoint : EntityBase
{ {
_gamePointId = 0; _gamePointId = 0;
_participantId = 0; _participantId = 0;
_gameHeatId = 0; _gameRoundId = 0;
_gameDate = DateTime.Now; _gameDate = DateTime.Now;
_gameHeatRegNr = 0; _gameRoundRegNr = 0;
_gameRegPoints = 0; _gameRegPoints = 0;
_pointStatus = GamePointStatus.New;
} }
private int _gamePointId; private int _gamePointId;
private int _participantId; private int _participantId;
private int _gameHeatId; private int _gameRoundId;
private DateTime _gameDate; private DateTime _gameDate;
private int _gameHeatRegNr; private int _gameRoundRegNr;
private int _gameRegPoints; private int _gameRegPoints;
private GamePointStatus _pointStatus;
[PrimaryKey] [PrimaryKey]
[AutoIncrement] [AutoIncrement]
@ -45,14 +47,14 @@ public class GamePoint : EntityBase
RaisePropertyChanged(nameof(ParticipantId)); RaisePropertyChanged(nameof(ParticipantId));
} }
} }
[Column("GameHeatId")] [Column("GameRoundId")]
public int GameHeatId public int GameRoundId
{ {
get { return _gameHeatId; } get { return _gameRoundId; }
set set
{ {
_gameHeatId = value; _gameRoundId = value;
RaisePropertyChanged(nameof(GameHeatId)); RaisePropertyChanged(nameof(GameRoundId));
} }
} }
@ -67,14 +69,14 @@ public class GamePoint : EntityBase
} }
} }
[Column("GameHeatRegNr")] [Column("GameRoundRegNr")]
public int GameHeatRegNr public int GameRoundRegNr
{ {
get { return _gameHeatRegNr; } get { return _gameRoundRegNr; }
set set
{ {
_gameHeatRegNr = value; _gameRoundRegNr = value;
RaisePropertyChanged(nameof(GameHeatRegNr)); RaisePropertyChanged(nameof(GameRoundRegNr));
} }
} }
@ -88,4 +90,17 @@ public class GamePoint : EntityBase
RaisePropertyChanged(nameof(GameRegPoints)); RaisePropertyChanged(nameof(GameRegPoints));
} }
} }
[Column("PointStatus")]
public GamePointStatus PointStatus
{
get { return _pointStatus; }
set
{
_pointStatus = value;
RaisePropertyChanged(nameof(PointStatus));
}
}
} }

View File

@ -0,0 +1,57 @@
using Common.Library;
using SQLite;
namespace GreadyPoang.EntityLayer;
[Table("GameRound")]
public class GameRound : EntityBase
{
public GameRound()
{
_gameRoundId = 0;
_gameRoundStartDate = DateTime.Now;
_gameRoundFinished = null;
}
private int _gameRoundId;
private DateTime _gameRoundStartDate;
private DateTime? _gameRoundFinished;
[Column("GameRoundFinished")]
public DateTime? GameRoundFinished
{
get { return _gameRoundFinished; }
set
{
_gameRoundFinished = value;
RaisePropertyChanged(nameof(GameRoundFinished));
}
}
[Column("GameRoundStartDate")]
public DateTime GameRoundStartDate
{
get { return _gameRoundStartDate; }
set
{
_gameRoundStartDate = value;
RaisePropertyChanged(nameof(GameRoundStartDate));
}
}
[PrimaryKey]
[AutoIncrement]
[Column("GameRoundId")]
public int GameRoundId
{
get { return _gameRoundId; }
set
{
_gameRoundId = value;
RaisePropertyChanged(nameof(GameRoundId));
}
}
}

View File

@ -0,0 +1,9 @@
namespace GreadyPoang.EntityLayer;
public enum GamePointStatus
{
New = 0,
InProgress = 1,
Completed = 2,
Cancelled = 3
}

View File

@ -28,3 +28,6 @@ class Program
options.UseSqlite($"Data Source={dbPath}")); options.UseSqlite($"Data Source={dbPath}"));
}); });
} }
// dotnet ef migrations add FixHeatToRoundParams --project GreadyPoang.DataLayer --startup-project GreadyPoang.Migrations
// dotnet ef database update --project GreadyPoang.DataLayer --startup-project GreadyPoang.Migrations

View File

@ -18,10 +18,6 @@ public class ParticipantViewModel : ViewModelBase
Repository = repo; Repository = repo;
} }
//public ParticipantViewModel(IRepository<Participant> repo) : base()
//{
// Repository = repo;
//}
#endregion #endregion
#region Private Variables #region Private Variables

View File

@ -1,10 +1,13 @@
namespace GreadyPoang using GreadyPoang.DataLayer.Database;
namespace GreadyPoang
{ {
public partial class App : Application public partial class App : Application
{ {
public App() public App(DataContext dataContext)
{ {
InitializeComponent(); InitializeComponent();
dataContext.Database.EnsureCreated();
} }
protected override Window CreateWindow(IActivationState? activationState) protected override Window CreateWindow(IActivationState? activationState)

View File

@ -17,6 +17,10 @@
Title="Deltagare" Title="Deltagare"
ContentTemplate="{DataTemplate views:ParticipantListView}" ContentTemplate="{DataTemplate views:ParticipantListView}"
Route="ParticipantListView" /> Route="ParticipantListView" />
<ShellContent
Title="Starta Ny Runda"
ContentTemplate="{DataTemplate views:RoundStartingView}"
Route="RoundStartingView" />
</TabBar> </TabBar>
</Shell> </Shell>

View File

@ -88,6 +88,9 @@
<MauiXaml Update="Views\ParticipantListView.xaml"> <MauiXaml Update="Views\ParticipantListView.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</MauiXaml> </MauiXaml>
<MauiXaml Update="Views\RoundStartingView.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -29,7 +29,6 @@ public static class MauiProgram
{ {
File.WriteAllText(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "MauiDataPath_GreadyPoang.txt"), MauiDataPath); File.WriteAllText(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "MauiDataPath_GreadyPoang.txt"), MauiDataPath);
} }
//var dbPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "PoangDB.db");
var dbPath = Path.Combine(MauiDataPath, "PoangDB.db"); var dbPath = Path.Combine(MauiDataPath, "PoangDB.db");
options.UseSqlite($"Data Source={dbPath}"); options.UseSqlite($"Data Source={dbPath}");
}); });

View File

@ -6,15 +6,22 @@
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
IgnorableNamespaces="uap rescap"> IgnorableNamespaces="uap rescap">
<Identity Name="maui-package-name-placeholder" Publisher="CN=User Name" Version="0.0.0.0" /> <Identity Name="com.idoit4u.GreadyPoang"
Publisher="CN=Idoit4u"
Version="1.0.0.0" />
<mp:PhoneIdentity PhoneProductId="BF559627-AEE2-4FB6-899B-B955FD4F3019" PhonePublisherId="00000000-0000-0000-0000-000000000000"/> <Properties>
<DisplayName>GreadyPoang</DisplayName>
<PublisherDisplayName>Idoit4u</PublisherDisplayName>
</Properties>
<Properties> <mp:PhoneIdentity PhoneProductId="BF559627-AEE2-4FB6-899B-B955FD4F3019" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
<!--<Properties>
<DisplayName>$placeholder$</DisplayName> <DisplayName>$placeholder$</DisplayName>
<PublisherDisplayName>User Name</PublisherDisplayName> <PublisherDisplayName>User Name</PublisherDisplayName>
<Logo>$placeholder$.png</Logo> <Logo>$placeholder$.png</Logo>
</Properties> </Properties>-->
<Dependencies> <Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" /> <TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />

View File

@ -21,7 +21,7 @@
<Style TargetType="Border" <Style TargetType="Border"
x:Key="Border.Page"> x:Key="Border.Page">
<Setter Property="Stroke" Value="CadetBlue" /> <Setter Property="Stroke" Value="CadetBlue" />
<Setter Property="BackgroundColor" Value="LightGrey" /> <Setter Property="BackgroundColor" Value="LightGray" />
<Setter Property="StrokeThickness" Value="1" /> <Setter Property="StrokeThickness" Value="1" />
<Setter Property="Margin" Value="5" /> <Setter Property="Margin" Value="5" />
<Setter Property="HorizontalOptions" Value="Fill" /> <Setter Property="HorizontalOptions" Value="Fill" />

View File

@ -22,7 +22,7 @@
ViewDescription="Lägg till deltagare här" /> ViewDescription="Lägg till deltagare här" />
<Border Stroke="Gold" StrokeThickness="2" BackgroundColor="LemonChiffon" Grid.Row="1"> <Border Stroke="Gold" StrokeThickness="2" BackgroundColor="LemonChiffon" Grid.Row="1">
<StackLayout Spacing="4" > <StackLayout Spacing="4" >
<FlexLayout Wrap="Wrap"> <FlexLayout Wrap="Wrap" >
<Label Style="{StaticResource Label}" <Label Style="{StaticResource Label}"
Text="Deltagare Förnamn:" Text="Deltagare Förnamn:"
FontAttributes="Bold"/> FontAttributes="Bold"/>
@ -63,11 +63,12 @@
<CollectionView.ItemTemplate> <CollectionView.ItemTemplate>
<DataTemplate x:DataType="model:Participant"> <DataTemplate x:DataType="model:Participant">
<!--Stroke="DarkGray" BackgroundColor="Cornsilk"--> <!--Stroke="DarkGray" BackgroundColor="Cornsilk"-->
<Border Margin="8" Padding="12" > <Border Margin="8" Padding="12" >
<VerticalStackLayout Spacing="4"> <VerticalStackLayout Spacing="4">
<HorizontalStackLayout> <HorizontalStackLayout>
<Label FontAttributes="Bold" <Label FontAttributes="Bold"
FontSize="Title" FontSize="Title"
TextColor="CadetBlue"
Text="{Binding LastNameFirstName}" /> Text="{Binding LastNameFirstName}" />
</HorizontalStackLayout> </HorizontalStackLayout>
<HorizontalStackLayout> <HorizontalStackLayout>

View File

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:partial="clr-namespace:GreadyPoang.ViewsPartial"
x:Class="GreadyPoang.Views.RoundStartingView"
Title="Starta ny Runda">
<Border Style="{StaticResource Border.Page}" StrokeThickness="4">
<Grid Style="{StaticResource Grid.Page}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<partial:HeaderView Grid.Row="0"
Grid.ColumnSpan="2"
ViewTitle="Starta en Spelrunda"
ViewDescription="Välj deltagare och initiera spel" />
<Border Grid.Row="1" Stroke="Gold" StrokeThickness="2" BackgroundColor="LemonChiffon" >
<Label Text="Här kommer du kunna välja deltagare och starta en ny spelrunda"
FontAttributes="Bold"
HorizontalOptions="Center"
VerticalOptions="Center"/>
</Border>
<Border Grid.Row="2" Stroke="Gold" BackgroundColor="Ivory" StrokeThickness="2" Padding="5">
<Label Text="Här kommer en lista på alla spelrundor att visas"
FontAttributes="Bold"
HorizontalOptions="Center"
VerticalOptions="Center"/>
</Border>
</Grid>
</Border>
</ContentPage>

View File

@ -0,0 +1,9 @@
namespace GreadyPoang.Views;
public partial class RoundStartingView : ContentPage
{
public RoundStartingView()
{
InitializeComponent();
}
}

View File

@ -6,13 +6,13 @@
<Label <Label
Text="{Binding ViewTitle}" Text="{Binding ViewTitle}"
HorizontalOptions="Center" HorizontalOptions="Center"
FontSize="Title" /> FontSize="Title" FontAttributes="Bold" TextColor="RoyalBlue" />
<Label <Label
Grid.ColumnSpan="2" Grid.ColumnSpan="2"
Text="{Binding ViewDescription}" Text="{Binding ViewDescription}"
HorizontalOptions="Center" HorizontalOptions="Center"
FontSize="Body" /> FontSize="Subtitle" TextColor="DarkBlue" />
<BoxView <BoxView
Grid.ColumnSpan="2" Grid.ColumnSpan="2"