public async Task <IActionResult> GetRecentResolvedQuerysAsync(int customerId = 0) { if (customerId <= 0) { return(BadRequest("Customer ID can't be 0")); // 400 } List <QueryMasterListModel> list = QueryMasterListModel .ConvertQueryMasterToListModel(await queryContext.GetRecentResolvedQueryOfCustomerAsync(customerId)); foreach (QueryMasterListModel qm in list) { qm.isQuerySolutionRated = await surveyContext.IsQueryRated(qm.QueryId); } return(Ok(list)); }