mirror of
https://github.com/GCMatters/hermes.git
synced 2026-02-04 05:30:13 +01:00
Usunalem EventApiController(dobry byl ale mial problemy). Dodalem EventsEndpoints, zawiera async, używa Dtos (Data Transfer Objects). Jeżeli chcecie zrobić HTTP request ale nie wiecie co dać w body JSONa to można sprawdzić w tych Dtos. EventMapping służy do zmian obiektów Dto na Entity i odwrotnie.
16 lines
436 B
C#
16 lines
436 B
C#
using System.ComponentModel.DataAnnotations;
|
|
using WebApp.Entities;
|
|
|
|
namespace WebApp.DTOs;
|
|
|
|
// Input values in JSON file to update event
|
|
public record class EventUpdateDto
|
|
(
|
|
[Required] int? OrganisationId,
|
|
[Required][StringLength(50)] string Title,
|
|
[StringLength(500)] string Description,
|
|
[Required][StringLength(100)] string Location,
|
|
[Required] DateTime? EventDate,
|
|
ICollection<EventSkill> EventSkills
|
|
);
|