public async Task <OpsProductTypeGetRes> GetOpsProductTypeDetails([FromBody] OpsProductTypeGetReq request) { var response = new OpsProductTypeGetRes(); try { if (request != null) { var result = await _opsRepository.GetOpsProductTypeDetails(request); if (result != null) { response = result; } else { response.ResponseStatus.Status = "Failure"; response.ResponseStatus.ErrorMessage = "Ann Error Occurs."; } } else { response.ResponseStatus.Status = "Failure"; response.ResponseStatus.ErrorMessage = "OpsProductTypeGetReq details can not be null."; } } catch (Exception ex) { response.ResponseStatus.Status = "Failure"; response.ResponseStatus.ErrorMessage = "An error occurs " + ex.Message; } return(response); }
public async Task <OpsProductTypeGetRes> GetOpsProductTypeDetails(OpsProductTypeGetReq opsProductTypeGetReq, string ticket) { OpsProductTypeGetRes opsProductTypeGetRes = new OpsProductTypeGetRes(); opsProductTypeGetRes = await serviceProxy.PostData(_configuration.GetValue <string>("ServiceOperations:GetOpsProductTypeDetails"), opsProductTypeGetReq, typeof(OpsProductTypeGetRes), ticket); return(opsProductTypeGetRes); }