public bool CopyPPPModel(CopyPPPModel copyPPPModel) { string _baseUri = ConfigurationManager.AppSettings["WebAPIURL"]; RestClient _restClient = new RestClient(new Uri(_baseUri)); var route = string.Format("{0}/{1}", RouteSuffix, "CopyPPPModel"); var result = JsonConvert.DeserializeObject <ApiResult <bool> >(_restClient.Execute( HttpRestClient.RestAuthRequest(Method.POST, route, ActiveUser).AddJsonBody(copyPPPModel)).Content).Results?.FirstOrDefault(); return(result.HasValue ? (bool)result : false); }
public async Task <bool> CopyPPPModel(CopyPPPModel copyPPPMopdel) { var output = await Task.Run(() => _programCommands.CopyPPPModel(copyPPPMopdel, Models.ApiContext.ActiveUser)); return(output); }