示例#1
0
        public Category Add(Category category)
        {
            var categorySet = _context.Set <Category>();

            categorySet.Add(category);
            _context.SaveChanges();
            return(category);
        }
        public Ticket Add(Ticket ticket)
        {
            var ticketSet = _context.Set <Ticket>();

            ticketSet.Add(ticket);
            _context.SaveChanges();
            return(ticket);
        }
示例#3
0
        public Comment Add(Comment comment)
        {
            var commentSet = _context.Set <Comment>();

            commentSet.Add(comment);
            _context.SaveChanges();
            return(comment);
        }