public void AddIssue(Issues issue) { using (LearnContext lc = new LearnContext()) { lc.Issues.Add(issue); lc.SaveChanges(); } }
public void DeleteIssue(int Id) { using (LearnContext lc = new LearnContext()) { Issues issues = lc.Issues.Find(Id); lc.Issues.Remove(issues); lc.SaveChanges(); } }