Files
BeWoPlaner/Service/DCEntityMapper/HomeViewPanelDC_HomeViewPanel.cs

44 lines
1.3 KiB
C#
Raw Normal View History

2019-08-12 16:49:42 +02:00
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;
namespace BeWo.Service.DCEntityMapper
{
public class HomeViewPanelDC_HomeViewPanel : AbstractIDCEntityMapper<HomeViewPanel, HomeViewPanelDC>
{
public override HomeViewPanelDC MergeWithDC(HomeViewPanel pEntity, HomeViewPanelDC pDataContract)
{
pDataContract.Oid = pEntity.Oid;
pDataContract.HeaderTitel = pEntity.HeaderTitel;
pDataContract.PanelType = pEntity.PanelType;
2019-08-15 11:06:50 +02:00
pDataContract.Value = pEntity.Value;
2019-08-12 16:49:42 +02:00
return pDataContract;
}
public override HomeViewPanel MergeWithEntity(HomeViewPanelDC pDataContract, HomeViewPanel pEntity)
{
pEntity.Oid = pDataContract.Oid;
pEntity.HeaderTitel = pDataContract.HeaderTitel;
pEntity.PanelType = pDataContract.PanelType;
2019-08-15 11:06:50 +02:00
pEntity.Value = pDataContract.Value;
2019-08-12 16:49:42 +02:00
return pEntity;
}
protected override bool AreDCAndEntityEqual(HomeViewPanelDC pDC, HomeViewPanel pEntity)
{
if (pDC.Oid == null)
{
return false;
}
return pDC.Oid == pEntity.Oid;
}
}
}