コード例 #1
0
 public Association SaveAssociation(Association association)
 {
     using (var context = new AdExpressDBContext())
     {
         context.Entry(association).State = EntityState.Modified;
         context.SaveChanges();
         return(association);
     }
 }
コード例 #2
0
 public Newspaper SaveNewspaper(Newspaper newspaper)
 {
     using (var context = new AdExpressDBContext())
     {
         context.Entry(newspaper).State = EntityState.Modified;
         context.SaveChanges();
         return(newspaper);
     }
 }