コード例 #1
0
        /// <summary>
        /// Deleting a favourite vacancy with from user
        /// </summary>
        /// <param name="userid">id of the user</param>
        /// <param name="vacancyid">id of the vacancy to be unfavorited</param>
        public void DeleteFavourite(int userid, int vacancyid)
        {
            Dictionary <string, object> parameters = new Dictionary <string, object>
            {
                { "@userid", userid },
                { "@vacancyid", vacancyid }
            };

            string query = @"DELETE FROM reg_vacatures_favoriet   
                             WHERE vf_user_id = @userid
                             AND vf_vacature_id = @vacancyid";

            vacancyRepository.DeleteFavouriteVacanacy(query, parameters);
        }