public static AgentTerrain MapAgentTerrain(XpoAgentTerrain xpoAgentTerrain) { return(new AgentTerrain { Name = xpoAgentTerrain.Name, id = xpoAgentTerrain.Oid }); }
public static XpoAgentTerrain MapAgentTerrain(AgentTerrain agentterrain, UnitOfWork uow) { XpoAgentTerrain agentTerrainReturned; if (agentterrain.newObject) { agentTerrainReturned = new XpoAgentTerrain(uow) { Oid = agentterrain.id }; } else { agentTerrainReturned = uow.GetObjectByKey <XpoAgentTerrain>(agentterrain.id); } agentTerrainReturned.Name = agentterrain.Name; //agentTerrainReturned.Secteur = MapSector(agentterrain.Secteur, uow); return(agentTerrainReturned); }