public IActionResult AssignDriver(int driverId, [FromQuery(Name = "id")] int[] ids) { try { repo.AssignDriver(driverId, ids); return(StatusCode(200, new { response = ApiMessages.RecordUpdated() })); } catch (DbUpdateException exception) { LoggerExtensions.LogException(driverId, logger, ControllerContext, null, exception); return(StatusCode(490, new { response = ApiMessages.RecordNotSaved() })); } }