public IBOEmployees BOEmployees(IEmployeesRepository repo) { BOEmployees boEmployees = (BOEmployees)BOEmployees(); boEmployees.Repository = repo; return(boEmployees); }
public async Task <IHttpActionResult> DeleteEmployees(Int32 id) { var result = Task.Factory.StartNew(() => { IUnitOfWork uow = new UnitOfWorkImp(new IRepositoryConnection[] { EmployeesRepository }); var bo = new BOEmployees(); bo.Repository = EmployeesRepository; 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 IBOEmployees BOEmployees() { var boEmployees = new BOEmployees() { İ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(boEmployees); }
public IBOEmployees BOEmployees() { var boEmployees = new BOEmployees() { EmployeeID = this.EmployeeID, LastName = this.LastName, FirstName = this.FirstName, Title = this.Title, TitleOfCourtesy = this.TitleOfCourtesy, BirthDate = this.BirthDate, HireDate = this.HireDate, Address = this.Address, City = this.City, Region = this.Region, PostalCode = this.PostalCode, Country = this.Country, HomePhone = this.HomePhone, Extension = this.Extension, Photo = this.Photo != null?Convert.FromBase64String(this.Photo) : null, Notes = this.Notes, ReportsTo = this.ReportsTo, PhotoPath = this.PhotoPath }; return(boEmployees); }