Exemple #1
0
 public List<IssueModel> getAll()
 {
     List<IssueModel> issues = new List<IssueModel>();
     using (KnowledgeBaseContext dc = new KnowledgeBaseContext(connectionString, mapping))
     {
         IEnumerable<IssueModel> allIssues = from i in dc.GetTable<IssueModel>() select i;
         foreach (var issue in allIssues)
         {
             issues.Add(issue);
         }
     }
     return issues;
 }
Exemple #2
0
 public bool add(IssueModel issue)
 {
     Guid id = issue.id;
     string title = issue.title;
     string symptom = issue.symptom;
     string diagnostic = issue.diagnostic;
     string fix = issue.fix;
     string comments = issue.comments;
     bool inserted = false;
     using (KnowledgeBaseContext dc = new KnowledgeBaseContext(connectionString, mapping))
     {
         if (dc.addIssue(id, title, symptom, diagnostic, fix, comments)>0)
         {
             inserted = true;
         }
     }
     return inserted;
 }