public Doctor(AddNewDoctorResponse response) { this.Email = response.Email; this.FirstName = response.FirstName; this.LastName = response.LastName; this.Id = response.Id; }
public IActionResult addDoctor(AddNewDoctorRequest request) { DTO.Responses.AddNewDoctorResponse response = new AddNewDoctorResponse(); response.Id = _DbService.GetDoctors().Count(); response.LastName = request.LastName; response.FirstName = request.FirstName; response.Email = request.Email; _DbService.AddDoctor(response); return(Ok("Dodano lekarza jakim jest: " + response.FirstName + " " + response.LastName)); }