public static ThisEntity GetByCtid(string ctid) { ThisEntity entity = new ThisEntity(); entity = DataSetProfileManager.GetByCtid(ctid); return(entity); }
public static ThisEntity HandlingExistingEntity(string ctid, ref SaveStatus status) { var entity = new ThisEntity(); //warning- entity = DataSetProfileManager.GetByCtid(ctid); if (entity != null && entity.Id > 0) { Entity relatedEntity = EntityManager.GetEntity(entity.RowId); if (relatedEntity == null || relatedEntity.Id == 0) { status.AddError(string.Format("Error - the related Entity for DataSetProfile: '{0}' ({1}), was not found.", entity.Name, entity.Id)); return(entity); } //any clean up? } return(entity); }