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

        {
            using (DbconnectionContext context = new DbconnectionContext())

            {
                context.Comment.Add(Comment);

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

        {
            using (DbconnectionContext context = new DbconnectionContext())

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

                return(listofcomments);
            }
        }