public HttpResponseMessage AddtoWishList(wishlistEntity WishObj) { try { var result = _LayoutDashboardServices.AddtoWishList(WishObj); if (result != null) { return(Request.CreateResponse(HttpStatusCode.OK, result)); } return(Request.CreateErrorResponse(HttpStatusCode.NotFound, "Something wrong! Please try again later.")); } catch (Exception) { throw; } }
public int?AddtoWishList(wishlistEntity WishlistObj) { try { SqlParameter[] sqlParameter = new SqlParameter[] { new SqlParameter("customer_id", WishlistObj.customer_id) , new SqlParameter("store_id", WishlistObj.store_id) , new SqlParameter("product_id", WishlistObj.product_id) }; var result = objGenericRepository.ExecuteSQL <int>("AddtoWishList", sqlParameter).FirstOrDefault(); return(result); } catch (Exception) { throw; } }