Esempio n. 1
0
        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());
        }
Esempio n. 2
0
 public List <ProjectListItem> GetAllSubProjects(Guid projectId)
 {
     return(ProjectedSource.Where(x => x.ParentId == projectId).ToList());
 }
Esempio n. 3
0
 public ProjectListItem GetSingleForUser(Guid id, Guid userId, string email)
 {
     return(ProjectedSource.Where(x => x.Id == id && x.CreatedByUserId == userId).FirstOrDefault());
 }