예제 #1
0
        public void RemoveAllByAuthor(Guid author)
        {
            var ticketSet = _context.Set <Ticket>();
            var tickets   = _context.Queryable <Ticket>().Where(t => t.AuthorId == author).ToArray();

            ticketSet.RemoveRange(tickets);
            _context.SaveChanges();
        }
예제 #2
0
 public IReadOnlyCollection <Ticket> FindAllWithStatus(bool completed, string searchString)
 {
     return(_context.Queryable <Ticket>().Where(t => t.IsCompleted == completed).OrderBy(t => t.CreatedAt).ToArray());
 }
예제 #3
0
 public List <Category> FindAll()
 {
     return(_context.Queryable <Category>().ToList());
 }
예제 #4
0
 public List <Comment> FindAll()
 {
     return(_context.Queryable <Comment>().ToList());
 }