示例#1
0
 public void updatestate(Like like)
 {
     using (var context = new TwetterContext())
     {
         context.Entry(like).State = EntityState.Modified;
         context.SaveChanges();
     };
 }
示例#2
0
 public void updatestate(Connection conn)
 {
     using (var context = new TwetterContext())
     {
         context.Entry(conn).State = EntityState.Modified;
         context.SaveChanges();
     };
 }
 public void Save()
 {
     using (TransactionScope tScope = new TransactionScope())
     {
         twcontext.SaveChanges();
         tScope.Complete();
     }
 }
示例#4
0
 public void updatestate(Retweet entity)
 {
     using (var context = new TwetterContext())
     {
         context.Entry(entity).State = EntityState.Modified;
         context.SaveChanges();
     };
 }