/// <summary> /// GetAsyncSupplierCodeDo. Returns a data object from a supplierCode. /// </summary> /// <param name="supplierCode"></param> /// <returns></returns> public async Task <ISupplierData> GetAsyncSupplierDo(string supplierCode) { var supplier = new Supplier(SqlExecutor); var loaded = await supplier.LoadValue(null, supplierCode).ConfigureAwait(false); if (loaded) { return(supplier); } return(supplier); }
public async Task <ISupplierData> GetAsyncSupplierDo(string validSupplierCode) { Supplier supplier = new Supplier(_executor); bool loaded = await supplier.LoadValue(null, validSupplierCode); if (loaded) { return(supplier); } return(supplier); }
/// <summary> /// GetAsyncSupplierCodeDo. Returns a data object from a supplierCode. /// </summary> /// <param name="supplierCode"></param> /// <returns></returns> public async Task <ISupplierData> GetAsyncSupplierDo(string supplierCode) { var supplier = new Supplier(SqlExecutor); try { var loaded = await supplier.LoadValue(null, supplierCode).ConfigureAwait(false); if (loaded) { return(supplier); } } catch (DataLayerException ex) { throw new DataLayerException(ex.Message, ex); } return(supplier); }