예제 #1
0
        public void InsertInfo(Models.InformationView Comment)

        {
            using (DbconnectionContext context = new DbconnectionContext())

            {
                context.Comment.Add(Comment);

                context.SaveChanges();
            }
        }
예제 #2
0
        public IEnumerable <Models.InformationView> ListInfo()

        {
            using (DbconnectionContext context = new DbconnectionContext())

            {
                var listofcomments = from Comments in context.Comment
                                     select Comments;

                return(listofcomments);
            }
        }