async Task IEmployeeservice.AddAsync(ProjectDrivingDto projectDriving) { var json = JsonSerializer.Serialize(projectDriving); var data = new StringContent(json, Encoding.UTF8, "application/json"); var response = await Client.PostAsync(_employeeRequestUri + "/AddProjectDrivingToProject", data).ConfigureAwait(false); response.EnsureSuccessStatusCode(); }
public static ProjectDriving Map(ProjectDrivingDto dto) { return(new ProjectDriving { Id = dto.Id, Amount = dto.Amount, UnitPrice = dto.UnitPrice, EmployeeID = dto.EmployeeId, Employee = EmployeeMapper.Map(dto.Employee), ProjectId = dto.ProjectId }); }
public void AddProjectDrivingToProject([FromBody] ProjectDrivingDto value) { _employeeService.Create(ProjectDrivingMapper.Map(value)); }