[HttpPost("Employee/{id}/{role}")] //Done public async Task <ActionResult <IEnumerable <string> > > Assign_Role(int id, string role) { try { var Add = await _doctorService.Assign_Roles(id, role); if (!Add) { return(NotFound($"Error : Employee id or Role not Exist")); } if (await _context.SaveChangesAsync() > 0) { return(Ok("Assigned Succesfully")); } } catch (Exception) { return(this.StatusCode(StatusCodes.Status500InternalServerError, "Database Failure")); } return(BadRequest()); }