Exemple #1
0
 // [Adds] Reference By Reference Type
 public Administrator Add(Administrator reference)
 {
     try {
         dbContext.Administrators.Add(reference);
         dbContext.SaveChanges();
     } catch (NullReferenceException exception) {
         System.Diagnostics.Debug.WriteLine(exception.Message);
     }
     return(reference);
 }
 // [Adds] Reference By Reference Type
 public ArticleContent Add(ArticleContent reference)
 {
     try {
         dbContext.ArticleContents.Add(reference);
         dbContext.SaveChanges();
     } catch (NullReferenceException exception) {
         System.Diagnostics.Debug.WriteLine(exception.Message);
     }
     return(reference);
 }