public IBOPurchaseOrderStatus BOPurchaseOrderStatus(IPurchaseOrderStatusRepository repo) { BOPurchaseOrderStatus boPurchaseOrderStatus = (BOPurchaseOrderStatus)BOPurchaseOrderStatus(); boPurchaseOrderStatus.Repository = repo; return(boPurchaseOrderStatus); }
public async Task <IHttpActionResult> DeletePurchaseOrderStatus(string id) { var result = Task.Factory.StartNew(() => { IUnitOfWork uow = new UnitOfWorkImp(new IRepositoryConnection[] { PurchaseOrderStatusRepository }); var bo = new BOPurchaseOrderStatus(); bo.Repository = PurchaseOrderStatusRepository; bo.Init(id); uow.Delete(bo); string err; if (!uow.Commit(out err)) { var resp = new HttpResponseMessage(HttpStatusCode.BadRequest) { Content = new StringContent(err) }; throw new HttpResponseException(resp); } return(true); }); await result; if (!result.Result) { return(NotFound()); } return(Ok(result.Result)); }
public IBOPurchaseOrderStatus BOPurchaseOrderStatus() { var boPurchaseOrderStatus = new BOPurchaseOrderStatus() { İd = this.İd, Status = this.Status }; return(boPurchaseOrderStatus); }