public async Task <Employee> CreateAsync(Employee employee) { try { var result = await _manager.CreateAsync(EmployeeTranslator.ToDomainModel(employee)); if (result == null) { return(null); } return(result.ToDataContract()); } catch (Exception ex) { Exception newEx; var rethrow = ExceptionPolicy.HandleException("service.policy", ex, out newEx); throw newEx; } }
public async Task Put([FromBody] Employee value) { await _manager.CreateAsync(value.ToDomainModel()); }