public IBOShippers BOShippers(IShippersRepository repo) { BOShippers boShippers = (BOShippers)BOShippers(); boShippers.Repository = repo; return(boShippers); }
public async Task <IHttpActionResult> DeleteShippers(string id) { var result = Task.Factory.StartNew(() => { IUnitOfWork uow = new UnitOfWorkImp(new IRepositoryConnection[] { ShippersRepository }); var bo = new BOShippers(); bo.Repository = ShippersRepository; 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 IBOShippers BOShippers() { var boShippers = new BOShippers() { İd = this.İd, Company = this.Company, LastName = this.LastName, FirstName = this.FirstName, EmailAddress = this.EmailAddress, JobTitle = this.JobTitle, BusinessPhone = this.BusinessPhone, HomePhone = this.HomePhone, MobilePhone = this.MobilePhone, FaxNumber = this.FaxNumber, Address = this.Address, City = this.City, StateProvince = this.StateProvince, ZipPostalCode = this.ZipPostalCode, CountryRegion = this.CountryRegion, WebPage = this.WebPage, Notes = this.Notes, Attachments = this.Attachments != null ? Convert.FromBase64String(this.Attachments) : null }; return boShippers; }
public IBOShippers BOShippers() { var boShippers = new BOShippers() { ShipperID = this.ShipperID, CompanyName = this.CompanyName, Phone = this.Phone }; return(boShippers); }