protected void CallRecipeDetailsApi() { try { objRecipeDetails = CallApiBL.CallRecipeDetailsApi(recipeId); //objRecipeDetails.IngredientsCount = objRecipeDetails.ingredientLines.Count.ToString(); BindDetails(); } catch (Exception ex) { ex.SendMail(); } }
protected void CallGetRecipeApi() { try { SearchRecipes objSearchRecipe = new SearchRecipes(); objSearchRecipe = CallApiBL.CallSearchRecipeApi(searchVal); foreach (Matches mat in objSearchRecipe.matches) { if (mat.smallImageUrls != null && mat.smallImageUrls.Count > 0) { mat.smallImageUrl = mat.smallImageUrls[0]; } } rptRecipiesList.DataSource = objSearchRecipe.matches; rptRecipiesList.DataBind(); } catch (Exception ex) { ex.SendMail(); } }