private void FillByGetPermutation(CommonLibrary.Enumerations.GetPermutations getPermutation, TestSprocGenerator.Business.SingleTable.Bo.Order Details filledBo) { if (this.BaseDataAccessAvailable()) { this.Clear(); TestSprocGenerator.Data.SingleTable.Dto.OrderDetails dto = ((TestSprocGenerator.Data.SingleTable.Dto.OrderDetails)(filledBo)); List <TestSprocGenerator.Data.SingleTable.Dto.OrderDetails> returnDto = _baseDataAccess.Get(dto, getPermutation); int control = returnDto.Count; if ((control > 0)) { int counter; for (counter = 0; (counter < control); counter = (counter + 1)) { TestSprocGenerator.Business.SingleTable.Bo.Order Details boToFill = new TestSprocGenerator.Business.SingleTable.Bo.Order Details(); _baseBusiness.FillThisWithDto(returnDto[counter], boToFill); this.Add(boToFill); } } } else { throw new System.ApplicationException(FILL_DB_SETTINGS_EXCEPTION); } }
public virtual void GetByPrimaryKey() { if (this.BaseDataAccessAvailable()) { TestSprocGenerator.Data.SingleTable.Dto.Profile_Blog dto = this; List <TestSprocGenerator.Data.SingleTable.Dto.Profile_Blog> returnDto = _baseDataAccess.Get(dto, CommonLibrary.Enumerations.GetPermutations.ByPrimaryKey); if ((returnDto.Count > 0)) { this.FillThisWithDto(returnDto[0]); } else { throw new System.ApplicationException(PRIMARY_KEY_NOT_FOUND_EXCEPTION_VAR_NAME); } } else { throw new System.ApplicationException(FILL_DB_SETTINGS_EXCEPTION); } }