예제 #1
0
        public void delete(int id)
        {
            WebsiteFAQ element = getById(id);

            _appDbContext.Faqs.Remove(element);
            _appDbContext.SaveChanges();
        }
예제 #2
0
        public void update(WebsiteFAQ faq)
        {
            WebsiteFAQ dbFaq = getById(faq.Id);

            dbFaq.Question = faq.Question;
            dbFaq.Answer   = faq.Answer;
            _appDbContext.SaveChanges();
        }
예제 #3
0
 public void insert(WebsiteFAQ element)
 {
     _appDbContext.Faqs.Add(element);
     _appDbContext.SaveChanges();
 }