select logo
This commit is contained in:
@@ -26,6 +26,7 @@ namespace Apollon.EntityFramework.Commands
|
||||
TournamentDto tournamentDto = new TournamentDto()
|
||||
{
|
||||
Id = tournament.Id,
|
||||
Logo = tournament.Logo,
|
||||
Organisation = tournament.Organisation,
|
||||
TournamentName = tournament.TournamentName,
|
||||
Competition = tournament.Competition,
|
||||
|
||||
@@ -25,6 +25,7 @@ namespace Apollon.EntityFramework.Commands
|
||||
TournamentDto tournamentDto = new TournamentDto()
|
||||
{
|
||||
Id = tournament.Id,
|
||||
Logo = tournament.Logo,
|
||||
Organisation = tournament.Organisation,
|
||||
TournamentName = tournament.TournamentName,
|
||||
Competition = tournament.Competition,
|
||||
|
||||
@@ -9,6 +9,7 @@ namespace Apollon.EntityFramework.DTOs
|
||||
public class TournamentDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Logo { get; set; }
|
||||
public string Organisation { get; set; }
|
||||
public string TournamentName { get; set; }
|
||||
public string Competition { get; set; }
|
||||
|
||||
67
Apollon.EntityFramework/Migrations/20221110003817_logo.Designer.cs
generated
Normal file
67
Apollon.EntityFramework/Migrations/20221110003817_logo.Designer.cs
generated
Normal file
@@ -0,0 +1,67 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Apollon.EntityFramework;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Apollon.EntityFramework.Migrations
|
||||
{
|
||||
[DbContext(typeof(TournamentsDbContext))]
|
||||
[Migration("20221110003817_logo")]
|
||||
partial class logo
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "6.0.8")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
|
||||
|
||||
modelBuilder.Entity("Apollon.EntityFramework.DTOs.TournamentDto", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Competition")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("CompetitionImage")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("EndDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Location")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Logo")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Organisation")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("Rounds")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("StartDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("TournamentName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Tournaments");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
25
Apollon.EntityFramework/Migrations/20221110003817_logo.cs
Normal file
25
Apollon.EntityFramework/Migrations/20221110003817_logo.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Apollon.EntityFramework.Migrations
|
||||
{
|
||||
public partial class logo : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Logo",
|
||||
table: "Tournaments",
|
||||
type: "nvarchar(max)",
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Logo",
|
||||
table: "Tournaments");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -40,6 +40,9 @@ namespace Apollon.EntityFramework.Migrations
|
||||
b.Property<string>("Location")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Logo")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Organisation")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@ namespace Apollon.EntityFramework.Queries
|
||||
|
||||
return tournamentsDtos.Select(y => new Tournament(
|
||||
y.Id,
|
||||
y.Logo,
|
||||
y.Organisation,
|
||||
y.TournamentName,
|
||||
y.Competition,
|
||||
|
||||
Reference in New Issue
Block a user