public int InsertOrUpdateCategoryAsPopular(int LoggedInUserId, CategoryPopularEntity categoryPopular) { try { SqlParameter[] param = new SqlParameter[] { new SqlParameter("category_popularId", categoryPopular.category_popularId != null ?categoryPopular.category_popularId:(object)DBNull.Value) , new SqlParameter("category_Id", categoryPopular.category_Id) , new SqlParameter("store_Id", categoryPopular.store_Id) , new SqlParameter("LoggedInUserId", LoggedInUserId) , new SqlParameter("createdby", categoryPopular.createdby) }; var result = CategoryPopularEntityGenericRepository.ExecuteSQL <int>("EXEC InsertOrUpdateCategoryAsPopular", param).ToList <int>().FirstOrDefault(); return(result); } catch (Exception) { throw; } }
public HttpResponseMessage InsertOrUpdateCategoryAsPopular(int LoggedInUserId, CategoryPopularEntity CategoryPopularEntity) { try { var result = _categoryServices.InsertOrUpdateCategoryAsPopular(LoggedInUserId, CategoryPopularEntity); return(Request.CreateResponse(HttpStatusCode.OK, result)); } catch (Exception) { throw; } }