Exemple #1
0
        public async Task <IActionResult> DeleteConfirmed(int id)
        {
            var newsletter = await _newsletterRepository.FindByIdAsync(id);

            _newsletterRepository.Unsubscribe(newsletter);
            await _newsletterRepository.SaveAll();

            return(RedirectToAction(nameof(Index)));
        }
Exemple #2
0
 public async Task <IHttpActionResult> UnSubscribe(int d, string em)
 {
     return(Ok(await newsLetRepo.Unsubscribe(d, em)));
 }