public void UpdateCartesianPoint(CartesianPointViewModel point) { try { CartesianPointDto pointDto = Mapper.Map <CartesianPointDto>(point); _robotProgramService.UpdateCartesianPoint(pointDto); } catch (FaultException ex) { throw new HttpException((int)HttpStatusCode.InternalServerError, "Error occured while updating point", ex); } }
public void UpdateCartesianPoint(CartesianPointDto point) { // TODO: null-possibility should rather be checked in Buisness logic, and here just try-catch-toFaultConv if (point == null) { var fault = new ArgumentFault { Message = "Argumnet is null", ArgumentName = nameof(point) }; throw new FaultException <ArgumentFault>(fault); } CartesianPoint pointEntity = Mapper.Map <CartesianPoint>(point); _robotProgramBusinessLogic.UpdateCartesianPoint(pointEntity); }