Example #1
0
        public Boolean UpdateAnnotation(int id, string annotation)
        {
            var marks = db.Marks.FirstOrDefault(x => x.id == id);

            if (marks != null)
            {
                marks.annotation = annotation;

                db.SaveChanges();
                return(true);
            }
            return(false);
        }
Example #2
0
        public bool DeleteMarkPost(int post_id)
        {
            using (var db = new SovaDbContext())
            {
                var mark = db.marks.FirstOrDefault(x => x.posts_id == post_id);

                if (mark != null)
                {
                    db.marks.Remove(mark);
                    db.SaveChanges();
                    return(true);
                }
                return(false);
            }
        }
Example #3
0
        public Boolean UpdateAnnotation(int id, string annotation)
        {
            using (var db = new SovaDbContext())
            {
                var marks = db.marks.FirstOrDefault(x => x.posts_id == id);

                if (marks != null)
                {
                    marks.annotation = annotation;
                    db.SaveChanges();
                    return(true);
                }

                return(false);
            }
        }