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(); }
public IReadOnlyCollection <Ticket> FindAllWithStatus(bool completed, string searchString) { return(_context.Queryable <Ticket>().Where(t => t.IsCompleted == completed).OrderBy(t => t.CreatedAt).ToArray()); }
public List <Category> FindAll() { return(_context.Queryable <Category>().ToList()); }
public List <Comment> FindAll() { return(_context.Queryable <Comment>().ToList()); }