Beispiel #1
0
        public IQueryable <TimePeriod> GetMyTimePeriods(IPrincipal User)
        {
            ApplicationUser currentUser = GetUser(User.Identity);

            if (currentUser == null)
            {
                return(Enumerable.Empty <TimePeriod>().AsQueryable());
            }
            return(TimePeriods.Where(tp => tp.Activity.Task.Project.User.Id == currentUser.Id));
        }