mirror of
https://github.com/GCMatters/hermes.git
synced 2026-02-04 05:30:13 +01:00
feat: basic organization endpoint
This commit is contained in:
27
WebApp/Mapping/OrganizationMapping.cs
Normal file
27
WebApp/Mapping/OrganizationMapping.cs
Normal 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
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user