Exemplo n.º 1
0
        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);
                }
        }
Exemplo n.º 2
0
        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);
                }
        }
Exemplo n.º 3
0
        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);
                }
        }