public async Task <ActionResult <DeveloperDto> > Create(CreateDeveloperRequest createDeveloper) { var createdDeveloper = await this.developerService.CreateAsync(createDeveloper.FirstName, createDeveloper.LastName, createDeveloper.WorkedFrom); var dto = new DeveloperDto { Id = createdDeveloper.Id, FirstName = createdDeveloper.FirstName, LastName = createdDeveloper.LastName, WorkedFrom = createdDeveloper.WorkedFrom }; return(Ok(dto)); }
public async Task <ActionResult <DeveloperDto> > Update(DeveloperDto developerInfo) { var createdDeveloper = await this.developerService.UpdatePropertiesAsync( developerInfo.Id, developerInfo.FirstName, developerInfo.LastName, developerInfo.WorkedFrom ); var dto = new DeveloperDto { Id = createdDeveloper.Id, FirstName = createdDeveloper.FirstName, LastName = createdDeveloper.LastName, WorkedFrom = createdDeveloper.WorkedFrom }; return(Ok(dto)); }