Beispiel #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);
                }
        }
Beispiel #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);
                }
        }
Beispiel #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);
                }
        }