Example #1
0
 public string Plot(UserDataViewModel plotRequest)
 {
     try
     {
         var userDataDTO = new UserDataDTO {
             A = plotRequest.A, B = plotRequest.B, C = plotRequest.C, PointFrom = plotRequest.PointFrom, PointTo = plotRequest.PointTo, Step = plotRequest.Step
         };
         _userDataService.AddUserData(userDataDTO);
         List <PointDTO> pointDTOs = new List <PointDTO>();
         pointDTOs = _userDataService.Plot(userDataDTO);
         return(JsonConvert.SerializeObject(pointDTOs));
     }
     catch (ValidationException ex)
     {
         return(ex.ToString());
     }
 }