Add game and game detail dtos
This commit is contained in:
@@ -4,7 +4,7 @@ namespace GameIdeas.BlazorApp.Helpers;
|
||||
|
||||
public static class GameHelper
|
||||
{
|
||||
public static void WriteTrackingDto(GameDto game)
|
||||
public static void WriteTrackingDto(GameDetailDto game)
|
||||
{
|
||||
game.CreationUserId = 100000;
|
||||
game.CreationDate = DateTime.Now;
|
||||
|
||||
@@ -18,7 +18,7 @@ public partial class GameCreationForm
|
||||
[Parameter] public CategoriesDto? Categories { get; set; }
|
||||
[Parameter] public EventCallback OnSubmit { get; set; }
|
||||
|
||||
private GameDto GameDto = new();
|
||||
private GameDetailDto GameDto = new();
|
||||
private EditContext? EditContext;
|
||||
private readonly SelectTheme Theme = SelectTheme.Creation;
|
||||
private readonly SliderParams SliderParams = new() { Gap = 1, Min = 1, Max = 5 };
|
||||
|
||||
@@ -4,7 +4,7 @@ using GameIdeas.Shared.Dto;
|
||||
|
||||
namespace GameIdeas.BlazorApp.Pages.Games.Components;
|
||||
|
||||
public class GameValidation : AbstractValidator<GameDto>
|
||||
public class GameValidation : AbstractValidator<GameDetailDto>
|
||||
{
|
||||
public GameValidation()
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace GameIdeas.BlazorApp.Pages.Games.Gateways;
|
||||
|
||||
public class GameGateway(IHttpClientService httpClientService) : IGameGateway
|
||||
{
|
||||
public async Task<int> CreateGame(GameDto game)
|
||||
public async Task<int> CreateGame(GameDetailDto game)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
@@ -5,6 +5,6 @@ namespace GameIdeas.BlazorApp.Pages.Games.Gateways;
|
||||
public interface IGameGateway
|
||||
{
|
||||
Task<CategoriesDto> FetchCategories();
|
||||
Task<int> CreateGame(GameDto game);
|
||||
Task<int> CreateGame(GameDetailDto game);
|
||||
Task<IEnumerable<GameDto>> FetchGames(PaggingDto pagging);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user