43 lines
1.3 KiB
C#
43 lines
1.3 KiB
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using BeWo.Data.Access;
|
|
using BeWo.Data.Entities;
|
|
|
|
using BS.Shared;
|
|
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;
|
|
pDataContract.Value = pEntity.Value;
|
|
|
|
return pDataContract;
|
|
}
|
|
|
|
public override HomeViewPanel MergeWithEntity(HomeViewPanelDC pDataContract, HomeViewPanel pEntity)
|
|
{
|
|
pEntity.Oid = pDataContract.Oid;
|
|
pEntity.HeaderTitel = pDataContract.HeaderTitel;
|
|
pEntity.PanelType = pDataContract.PanelType;
|
|
pEntity.Value = pDataContract.Value;
|
|
|
|
return pEntity;
|
|
}
|
|
|
|
protected override bool AreDCAndEntityEqual(HomeViewPanelDC pDC, HomeViewPanel pEntity)
|
|
{
|
|
if (pDC.Oid == null)
|
|
{
|
|
return false;
|
|
}
|
|
|
|
return pDC.Oid == pEntity.Oid;
|
|
}
|
|
}
|
|
} |