public ISampleDTO SampleMethod(ISampleDTO sampleDTO) { //Entity Converter //Save to DB sampleDTO.SampleProperty = "New Value"; return(sampleDTO); }
public OperationResult <ISampleDTO> SampleMethod(ISampleDTO sampleDTO) { OperationResult <ISampleDTO> retVal = null; try { ISampleDAC sampleDAC = (ISampleDAC)DACFactory.Instance.Create(DACType.SampleDAC); sampleDTO = sampleDAC.SampleMethod(sampleDTO); retVal = OperationResult <ISampleDTO> .CreateSuccessResult(sampleDTO); } catch (DACException dacEx) { retVal = OperationResult <ISampleDTO> .CreateErrorResult(dacEx.Message, dacEx.StackTrace); } catch (Exception ex) { ExceptionManager.HandleException(ex); retVal = OperationResult <ISampleDTO> .CreateErrorResult(ex.Message, ex.StackTrace); } return(retVal); }
public OperationResult <ISampleDTO> SampleMethod(ISampleDTO sampleDTO) { ISampleBDC sampleBDC = (ISampleBDC)BDCFactory.Instance.Create(BDCType.SampleBDC); return(sampleBDC.SampleMethod(sampleDTO)); }
public OperationResult <ISampleDTO> SampleMethod(ISampleDTO sampleDTO) { ISampleBDC sampleBDC = (ISampleBDC)BDCFactory.Instance.Create(BDCType.SampleBDC);//because bdcfactory is singleton, as we cant create object with new keyword return(sampleBDC.SampleMethod(sampleDTO)); }