Files
BeWoPlaner/Service/DCEntityMapper/IDCEntityMapper.cs

28 lines
911 B
C#

using System;
using System.Collections.Generic;
using BeWo.Data.Entities;
namespace BeWo.Service.DCEntityMapper
{
public interface IDCEntityMapper<TEntity, TDC>
where TDC : new() where TEntity : BeWoEntityBase, new()
{
TDC MapToNewDC(TEntity pEntity);
List<TDC> MapToNewDCs(IEnumerable<TEntity> pEntitys);
List<TEntity> MapToNewEntities(IEnumerable<TDC> pDataContracts);
TEntity MapToNewEntity(TDC pDataContract);
TDC MergeWithDC(TEntity pEntity, TDC pDataContract);
TEntity MergeWithEntity(TDC pDataContract, TEntity pEntity);
Dictionary<string, object> ToJsonDictionary(TDC pDC);
Dictionary<string, object> ToJsonDictionary(TEntity pEntity);
IList<Dictionary<string, object>> ToJsonDictionary(IList<TEntity> pEntities);
IList<Dictionary<string, object>> ToJsonDictionary(IList<TDC> pDCs);
}
}