/// <param name='operations'> /// Reference to the Api.Sdk.IBorrower. /// </param> /// <param name='borrowerId'> /// Required. /// </param> public static object DeleteByBorrowerid(this IBorrower operations, string borrowerId) { return(Task.Factory.StartNew((object s) => { return ((IBorrower)s).DeleteByBorroweridAsync(borrowerId); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <param name='operations'> /// Reference to the Api.Sdk.IBorrower. /// </param> /// <param name='borrower'> /// Required. /// </param> public static BorrowerDto PutByBorrower(this IBorrower operations, BorrowerDto borrower) { return(Task.Factory.StartNew((object s) => { return ((IBorrower)s).PutByBorrowerAsync(borrower); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Tworzy obiekt czytaj¹cy na podstawie dostarczonego zapytania SQL, /// wykonuje metodê BorrowReader dostarczonego obiektu IBorrower /// i zamyka obiekt czytaj¹cy. /// </summary> /// <param name="sql">Wykonywane zapytanie SQL.</param> /// <param name="borrower">Obiekt implementuj¹cy IBorrower.</param> /// <returns>Wartoœæ zwracana przez dostarczon¹ metodê.</returns> public static object LendReader2(string sql, IBorrower borrower) { using (OleDbConnection conn = DataServices.CreateConnection()) { conn.Open(); OleDbCommand c = new OleDbCommand(sql, conn); OleDbDataReader r = c.ExecuteReader(); return(borrower.BorrowReader(r)); } }
public async Task <BorrowerDto> Update(BorrowerDto borrowerDto) { IBorrower borrower = await BorrowerFactory.FetchAsync(borrowerDto.Id); borrower.Position = borrowerDto.Position; borrower.EDisclosureConsent = borrowerDto.EDisclosureConsent; borrower.EmailConsent = borrowerDto.EmailConsent; borrower.EmailAddress = borrowerDto.EmailAddress; borrower = await borrower.SaveAsync() as IBorrower; return(new BorrowerDto { PartnerId = borrower.PartnerId, CobranderId = borrower.CobranderId, SiteProfileId = borrower.SiteProfileId, AccountId = borrower.AccountId, Id = borrower.Id, Position = borrower.Position, EDisclosureConsent = borrower.EDisclosureConsent, EmailConsent = borrower.EmailConsent, EmailAddress = borrower.EmailAddress }); }
public async Task <BorrowerDto> Insert(BorrowerDto borrowerDto) { IBorrower borrower = await BorrowerFactory.CreateAsync(new Tuple <Guid, Guid, Guid, Guid>(borrowerDto.PartnerId, borrowerDto.CobranderId, borrowerDto.SiteProfileId, borrowerDto.AccountId)); borrower.Position = borrowerDto.Position; borrower.EDisclosureConsent = borrowerDto.EDisclosureConsent; borrower.EmailConsent = borrowerDto.EmailConsent; borrower.EmailAddress = borrowerDto.EmailAddress; borrower = await borrower.SaveAsync() as IBorrower; return(new BorrowerDto { PartnerId = borrower.PartnerId, CobranderId = borrower.CobranderId, SiteProfileId = borrower.SiteProfileId, AccountId = borrower.AccountId, Id = borrower.Id, Position = borrower.Position, EDisclosureConsent = borrower.EDisclosureConsent, EmailConsent = borrower.EmailConsent, EmailAddress = borrower.EmailAddress }); }
public BorrowerController(IBorrower _IBorrower, IStatus _IStatus, DBContext _db) { _Borrower = _IBorrower; _Status = _IStatus; db = _db; }
public ReturnBookContext(IBorrower borrower, Library library) { _borrower = borrower; _library = library; }
/// <param name='operations'> /// Reference to the Api.Sdk.IBorrower. /// </param> /// <param name='borrowerId'> /// Required. /// </param> /// <param name='cancellationToken'> /// Cancellation token. /// </param> public static async Task <BorrowerDto> GetByBorroweridAsync(this IBorrower operations, string borrowerId, CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Microsoft.Rest.HttpOperationResponse <Api.Sdk.Models.BorrowerDto> result = await operations.GetByBorroweridWithOperationResponseAsync(borrowerId, cancellationToken).ConfigureAwait(false); return(result.Body); }
/// <summary> /// Initializes a new instance of the LendingRestClient class. /// </summary> /// <param name='rootHandler'> /// Optional. The http client handler used to handle http transport. /// </param> /// <param name='handlers'> /// Optional. The set of delegating handlers to insert in the http /// client pipeline. /// </param> public LendingRestClient(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers) { this._borrower = new Borrower(this); this._baseUri = new Uri("http://l2borrowerpoc.azurewebsites.net"); }
/// <summary> /// Initializes a new instance of the LendingRestClient class. /// </summary> public LendingRestClient() : base() { this._borrower = new Borrower(this); this._baseUri = new Uri("http://l2borrowerpoc.azurewebsites.net"); }
public BorrowersController(IBorrower iBorrower) { this._IBorrower = iBorrower; }
/// <param name='operations'> /// Reference to the Api.Sdk.IBorrower. /// </param> /// <param name='borrower'> /// Required. /// </param> /// <param name='cancellationToken'> /// Cancellation token. /// </param> public static async Task <BorrowerDto> PostByBorrowerAsync(this IBorrower operations, BorrowerDto borrower, CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Microsoft.Rest.HttpOperationResponse <BorrowerDto> result = await operations.PostByBorrowerWithOperationResponseAsync(borrower, cancellationToken).ConfigureAwait(false); return(result.Body); }
public BorrowBookContext(IBorrower borrower, Library library) { _borrower = borrower; _library = library; }
/// <summary> /// Initializes a new instance of the Lending20APIV1 class. /// </summary> /// <param name='handlers'> /// Optional. The set of delegating handlers to insert in the http /// client pipeline. /// </param> public Lending20APIV1(params DelegatingHandler[] handlers) : base(handlers) { this._borrower = new Borrower(this); this._baseUri = new Uri("http://l2borrowerpoc.azurewebsites.net"); }
public LoanController(ILoan _ILoan, IBook _IBook, IBorrower _IBorrower) { _Loan = _ILoan; _Book = _IBook; _Borrower = _IBorrower; }