public void delete(int id) { WebsiteFAQ element = getById(id); _appDbContext.Faqs.Remove(element); _appDbContext.SaveChanges(); }
public void update(WebsiteFAQ faq) { WebsiteFAQ dbFaq = getById(faq.Id); dbFaq.Question = faq.Question; dbFaq.Answer = faq.Answer; _appDbContext.SaveChanges(); }
public void insert(WebsiteFAQ element) { _appDbContext.Faqs.Add(element); _appDbContext.SaveChanges(); }