Files
BeWoPlaner/Service/DCEntityMapper/ImageDC_ImageSimple.cs
2024-08-26 15:51:36 +02:00

57 lines
1.7 KiB
C#

using System.Collections.Generic;
using System.Linq;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BS.Shared;
using BS.Shared.Core;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Wohnhilfe;
namespace BeWo.Service.DCEntityMapper
{
public class ImageDC_ImageSimple : AbstractIDCEntityMapper<ImageSimple, ImageDC>
{
public ImageDC MergeWithDC(ImageSimple pEntity, ImageDC pDataContract, WohneinheitDC wohneinheit)
{
pDataContract.Filename = pEntity.Filename;
pDataContract.Fullname = pEntity.Fullname;
pDataContract.ImageData = pEntity.ImageData;
if (wohneinheit.Grundrisse is null)
wohneinheit.Grundrisse = new List<ImageDC>();
wohneinheit.Grundrisse.Add(pDataContract);
return pDataContract;
}
public ImageSimple MergeWithEntity(ImageDC pDataContract, ImageSimple pEntity, Wohneinheit wohneinheit)
{
pEntity.Filename = pDataContract.Filename;
pEntity.Fullname = pDataContract.Fullname;
pEntity.ImageData = pDataContract.ImageData;
pEntity.Parent = wohneinheit;
return pEntity;
}
public override ImageDC MergeWithDC(ImageSimple pEntity, ImageDC pDataContract)
{
throw new System.NotImplementedException();
}
public override ImageSimple MergeWithEntity(ImageDC pDataContract, ImageSimple pEntity)
{
throw new System.NotImplementedException();
}
protected override bool AreDCAndEntityEqual(ImageDC pDC, ImageSimple pEntity)
{
throw new System.NotImplementedException();
}
}
}