public bool UpdateLinkpost(Linkpost linkpost) { using (var db = new Sova()) try { db.Attach(linkpost); db.Entry(linkpost).State = EntityState.Modified; return(db.SaveChanges() > 0); } catch (DbUpdateConcurrencyException) { return(false); } }
public bool UpdatePost_tag(Post_tag post_tag) { using (var db = new Sova()) try { db.Attach(post_tag); db.Entry(post_tag).State = EntityState.Modified; return(db.SaveChanges() > 0); } catch (DbUpdateConcurrencyException) { return(false); } }
public bool UpdateUser(User user) { using (var db = new Sova()) try { db.Attach(user); db.Entry(user).State = EntityState.Modified; return(db.SaveChanges() > 0); } catch (DbUpdateConcurrencyException) { return(false); } }