public (List <ProjectListItem>, long) GetAllForUser(int skip, int limit, Guid userId, string email = "", string query = "") { var defId = default(Guid); var queryResult = ProjectedSource.Where(x => (x.CreatedByUserId == userId || x.Invites.Any(z => z.Email.ToLower() == email.ToLower())) && (x.Name.ToLower().Contains(query) && x.ParentId == defId)).OrderByDescending(x => x.DateCreated); return(queryResult.Skip(skip).Take(limit).ToList(), queryResult.Count()); }
public List <ProjectListItem> GetAllSubProjects(Guid projectId) { return(ProjectedSource.Where(x => x.ParentId == projectId).ToList()); }
public ProjectListItem GetSingleForUser(Guid id, Guid userId, string email) { return(ProjectedSource.Where(x => x.Id == id && x.CreatedByUserId == userId).FirstOrDefault()); }