KI Promptbausteine: Parent mit mappen
This commit is contained in:
@@ -74,10 +74,14 @@ namespace BeWo.Service.DCEntityMapper
|
||||
dataContract.Name = entity.Name;
|
||||
dataContract.IsOnlyForEmployee = entity.IsOnlyForEmployee;
|
||||
dataContract.ActivationType = entity.IsActive;
|
||||
dataContract.IsParent = entity.IsParent;
|
||||
|
||||
if (entity.Employee != null)
|
||||
dataContract.Employee = MapperFactory.CompactEmployeeDC_Employee.MapToNewDC(entity.Employee);
|
||||
|
||||
if (entity.Parent != null)
|
||||
dataContract.Parent = MapperFactory.AiPromptbausteinDC_AiPromptbaustein.MapToNewDC(entity.Parent);
|
||||
|
||||
return dataContract;
|
||||
}
|
||||
|
||||
@@ -91,11 +95,13 @@ namespace BeWo.Service.DCEntityMapper
|
||||
entity.Name = dataContract.Name;
|
||||
entity.IsOnlyForEmployee = dataContract.IsOnlyForEmployee;
|
||||
entity.IsActive = dataContract.ActivationType;
|
||||
entity.IsParent = dataContract.IsParent;
|
||||
|
||||
if (dataContract.Employee != null)
|
||||
{
|
||||
entity.Employee = DAOFactory.GenericDAO.LoadByID<Employee>(dataContract.Employee.EmployeeOid);
|
||||
}
|
||||
|
||||
if (dataContract.Parent != null)
|
||||
entity.Parent = DAOFactory.GenericDAO.LoadByID<AiPromptbaustein>(dataContract.Parent.Oid.Value);
|
||||
|
||||
return entity;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user