Contracts.Employee Contracts.ISampleService.SaveEmployeeWithoutContact(Contracts.Employee employee) { using (var context = new AdventureWorksEntities()) { var employeeEntity = new ReverseMapper(new EntityModelObjectSource(context)) .AllowUpdating <Employee>() .MapFromEmployee(employee); context.SaveChanges(); return(new Mapper().MapToEmployee(employeeEntity)); } }
public System.Threading.Tasks.Task AddEmployeeToCompanyAsync(Contracts.Employee employee, Contracts.Company company) { return(base.Channel.AddEmployeeToCompanyAsync(employee, company)); }
public void AddEmployeeToCompany(Contracts.Employee employee, Contracts.Company company) { base.Channel.AddEmployeeToCompany(employee, company); }
public System.Threading.Tasks.Task AddEmployeeAsync(Contracts.Employee employee) { return(base.Channel.AddEmployeeAsync(employee)); }
public void AddEmployee(Contracts.Employee employee) { base.Channel.AddEmployee(employee); }
public Contracts.Employee UpdateEmployee(Contracts.Employee employee) { Model.Employee efEmployee = _mapper.Map <Contracts.Employee, Model.Employee>(employee); _employeeRepository.UpdateEmployee(efEmployee); return(employee); }
public Contracts.Employee CreateEmployee(Contracts.Employee employee) { Model.Employee efEmployee = _mapper.Map <Contracts.Employee, Model.Employee>(employee); efEmployee = _employeeRepository.CreateEmployee(efEmployee); return(_mapper.Map <Model.Employee, Contracts.Employee>(efEmployee)); }