public static RelationshipType ToRelType(RelTypeEntity entity) { if (entity == null) { return(null); } RelationshipType reltype = new RelationshipType(); reltype.id = entity.Id; reltype.relTypeText = entity.relTypeText; return(reltype); }
public RelationshipType GetRelTypeByID(int id) { RelTypeEntity entity = RelTypes.FirstOrDefault(x => x.Id == id); return(FromEntity.ToRelType(entity)); }