feat: basic organization endpoint

This commit is contained in:
2025-05-18 14:20:20 +02:00
parent 9034c058f0
commit eb9fa8b9ca
5 changed files with 83 additions and 3 deletions

View File

@@ -0,0 +1,27 @@
using Microsoft.EntityFrameworkCore;
using WebApp.DTOs;
using WebApp.Entities;
namespace WebApp.Mapping;
public static class OrganizationMapping
{
// obecnie zbędne
//public static Organisation ToEntity(this OrganisationSummaryDto ODto)
//{
// return new Organisation()
// {
// OrganisationId = ODto.OrganisationId!.Value,
// };
//}
public static OrganisationSummaryDto ToOrgSummaryDto(this Organisation org)
{
return new OrganisationSummaryDto(
org.OrganisationId,
org.Name,
org.Description,
org.Website
);
}
}