示例#1
0
        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
     });
 }
示例#3
0
 public void AddProjectDrivingToProject([FromBody] ProjectDrivingDto value)
 {
     _employeeService.Create(ProjectDrivingMapper.Map(value));
 }