public Facility Get(TWMFACILITY entity) { if (entity != null) { Facility obj = MapEntityToObject(entity); return(obj); } return(null); }
public Facility MapEntityToObject(TWMFACILITY entity) { Facility obj = new Facility(); obj.FacilityName = entity.CD_FACILITY; obj.FacilityDescription = entity.DS_FACILITY; obj.FlagActive = entity.FG_ACTIVE; obj.FlagCollectedByQty = entity.FG_COLLECT_BY_QTY; obj.LastChanged = entity.TS_LAST_CHANGED; obj.TPFacility = entity.TP_FACILITY; // obj.FacilityAttributes = entity.TWMFACATTRIBs != null && entity.TWMFACATTRIBs.Count > 0 ? new FacilityAttributeBl().Get(entity.TWMFACATTRIBs).ToList() : null; return(obj); }