public IBOOrdersStatus BOOrdersStatus(IOrdersStatusRepository repo) { BOOrdersStatus boOrdersStatus = (BOOrdersStatus)BOOrdersStatus(); boOrdersStatus.Repository = repo; return(boOrdersStatus); }
public async Task <IHttpActionResult> DeleteOrdersStatus(string id) { var result = Task.Factory.StartNew(() => { IUnitOfWork uow = new UnitOfWorkImp(new IRepositoryConnection[] { OrdersStatusRepository }); var bo = new BOOrdersStatus(); bo.Repository = OrdersStatusRepository; 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 IBOOrdersStatus BOOrdersStatus() { var boOrdersStatus = new BOOrdersStatus() { İd = this.İd, StatusName = this.StatusName }; return(boOrdersStatus); }