Esempio n. 1
0
        public void InsertInfo(Models.InformationView Comment)

        {
            using (DbconnectionContext context = new DbconnectionContext())

            {
                context.Comment.Add(Comment);

                context.SaveChanges();
            }
        }
Esempio n. 2
0
        public IEnumerable <Models.InformationView> ListInfo()

        {
            using (DbconnectionContext context = new DbconnectionContext())

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

                return(listofcomments);
            }
        }