mirror of
https://github.com/GCMatters/hermes.git
synced 2026-02-04 13:40:13 +01:00
28 lines
643 B
C#
28 lines
643 B
C#
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
|
|
);
|
|
}
|
|
}
|