コード例 #1
0
        public static aspnet_Membership GetMembershipUserByUsername(string username)
        {
            TimeTrackerEntities entity = new TimeTrackerEntities();
            Guid id = entity.Users.First(el => el.Username == username).UserID;

            return(entity.aspnet_Membership.First(el => el.UserId == id));
        }
コード例 #2
0
        public static void CreateTask(string TaskName, string Description, DateTime start, DateTime end, int estimation, string status, string[] userIds)
        {
            TimeTrackerEntities entity = new TimeTrackerEntities();
            Guid taskId = Guid.NewGuid();

            entity.AddToTasks(new Tasks()
            {
                TaskId      = taskId,
                TaskName    = TaskName,
                Description = Description,
                StartTime   = start,
                EndTime     = end,
                Estimation  = estimation,
                Status      = status,
                IsActive    = true
            });
            entity.SaveChanges();


            foreach (var user in userIds)
            {
                entity.AddToUsersTasks(new UsersTasks()
                {
                    Id     = Guid.NewGuid(),
                    UserId = Guid.Parse(user),
                    TaskId = taskId
                });
                entity.SaveChanges();
            }
        }
コード例 #3
0
ファイル: TasksDAL.cs プロジェクト: Lidiq/TimeTracker
        public static void CreateTask(string TaskName, string Description, DateTime start, DateTime end, int estimation, string status, string[] userIds)
        {
            TimeTrackerEntities entity = new TimeTrackerEntities();
            Guid taskId = Guid.NewGuid();
            entity.AddToTasks(new Tasks()
            {
                TaskId = taskId,
                TaskName = TaskName,
                Description = Description,
                StartTime = start,
                EndTime = end,
                Estimation = estimation,
                Status = status,
                IsActive = true
            });
            entity.SaveChanges();

            foreach (var user in userIds)
            {
                entity.AddToUsersTasks(new UsersTasks()
                {
                    Id = Guid.NewGuid(),
                    UserId = Guid.Parse(user),
                    TaskId = taskId
                });
                entity.SaveChanges();
            }
        }
コード例 #4
0
        public static List <WorkCards> GetCardsByUser(string username)
        {
            TimeTrackerEntities entity = new TimeTrackerEntities();
            Guid userId = entity.Users.First(el => el.Username == username).UserID;

            return(entity.WorkCards.Where(el => el.UserId == userId).ToList());
        }
コード例 #5
0
ファイル: TasksDAL.cs プロジェクト: Lidiq/TimeTracker
 /**
  * Delete task means change its status IsActive to false
  */
 public static void DeleteTask(Guid id)
 {
     TimeTrackerEntities entity = new TimeTrackerEntities();
     Tasks task = entity.Tasks.First(el => el.TaskId == id);
     task.IsActive = false;
     entity.SaveChanges();
 }
コード例 #6
0
        /**
         * Get the number of tasks assigned to a user
         */
        public static int GetUserNumberOfTasks(Guid userId)
        {
            //count userstasks by userid
            TimeTrackerEntities entity = new TimeTrackerEntities();

            return(entity.UsersTasks.Count(el => el.UserId == userId));
        }
コード例 #7
0
ファイル: CardsDAL.cs プロジェクト: Lidiq/TimeTracker
 /**
  * Delete work card
  */
 public static void DeleteCard(Guid cardId)
 {
     TimeTrackerEntities entity = new TimeTrackerEntities();
     WorkCards card = entity.WorkCards.First(el => el.CardId == cardId);
     entity.WorkCards.DeleteObject(card);
     entity.SaveChanges();
 }
コード例 #8
0
        public static JobItem GetJobItem(int jobItemId)
        {
            var ctx = new TimeTrackerEntities();

            var jobItem = ctx.DJobItems
                          .Include(x => x.DCustomer)
                          .Include(x => x.DRequestor)
                          .Include(x => x.DDeveloper)
                          .Where(x => x.DJobTimings.Any(y => DbFunctions.TruncateTime(y.StartTime.Value) == DbFunctions.TruncateTime(DateTime.Now)) || DbFunctions.TruncateTime(x.StartDate) == DbFunctions.TruncateTime(DateTime.Now));
            IQueryable <DJobItem> jobItemsToday = (from jobItems in jobItem select jobItems);

            var result = jobItemsToday.Select(x => new JobItem()
            {
                JobItemId     = x.JobItemId,
                JobTimings    = x.DJobTimings.Select(y => new JobTiming()).ToList(),
                Description   = x.Description,
                BillTo        = x.DRequestor.RequestorName,
                CustomerId    = (int)x.CustomerId,
                DeveloperCode = x.DDeveloper.DeveloperShortName,
                RequestedBy   = x.DRequestor.RequestorName
            }).FirstOrDefault(x => x.JobItemId == jobItemId);

            if (result == null)
            {
                logger.Warn("attempted to get non-existent job item. returning null");
            }

            return(result);
        }
コード例 #9
0
ファイル: UsersDAL.cs プロジェクト: Lidiq/TimeTracker
 /**
  * Delete user means change his status IsActive to false
  */
 public static void DeleteUser(string username)
 {
     TimeTrackerEntities entity = new TimeTrackerEntities();
     Guid id = entity.aspnet_Users.First(el => el.UserName == username).UserId;
     Users user = entity.Users.First(el => el.UserID == id);
     user.IsActive = false;
     entity.SaveChanges();
 }
コード例 #10
0
        /**
         * Delete task means change its status IsActive to false
         */
        public static void DeleteTask(Guid id)
        {
            TimeTrackerEntities entity = new TimeTrackerEntities();
            Tasks task = entity.Tasks.First(el => el.TaskId == id);

            task.IsActive = false;
            entity.SaveChanges();
        }
コード例 #11
0
        /**
         * Delete work card
         */
        public static void DeleteCard(Guid cardId)
        {
            TimeTrackerEntities entity = new TimeTrackerEntities();
            WorkCards           card   = entity.WorkCards.First(el => el.CardId == cardId);

            entity.WorkCards.DeleteObject(card);
            entity.SaveChanges();
        }
コード例 #12
0
        /**
         * Delete user means change his status IsActive to false
         */
        public static void DeleteUser(string username)
        {
            TimeTrackerEntities entity = new TimeTrackerEntities();
            Guid  id   = entity.aspnet_Users.First(el => el.UserName == username).UserId;
            Users user = entity.Users.First(el => el.UserID == id);

            user.IsActive = false;
            entity.SaveChanges();
        }
コード例 #13
0
        public static List <Users> GetUsersByTaskId(Guid taskId)
        {
            TimeTrackerEntities entity = new TimeTrackerEntities();
            List <UsersTasks>   all    = entity.UsersTasks.Select(el => el).Where(el => el.TaskId == taskId).ToList();

            List <Guid> userIds = all.Select(el => el.UserId).ToList();

            return(entity.Users.Select(el => el).Where(id => userIds.Contains(id.UserID) && id.IsActive).ToList());
        }
コード例 #14
0
ファイル: CardsDAL.cs プロジェクト: Lidiq/TimeTracker
 /**
  * Edit work card
  */
 public static void EditCard(Guid cardId, DateTime start, int duration, string comment)
 {
     TimeTrackerEntities entity = new TimeTrackerEntities();
     WorkCards card = entity.WorkCards.First(el => el.CardId == cardId);
     card.StartTime = start;
     card.Duration = duration;
     card.LogComment = comment;
     entity.SaveChanges();
 }
コード例 #15
0
        /**
         * Edit work card
         */
        public static void EditCard(Guid cardId, DateTime start, int duration, string comment)
        {
            TimeTrackerEntities entity = new TimeTrackerEntities();
            WorkCards           card   = entity.WorkCards.First(el => el.CardId == cardId);

            card.StartTime  = start;
            card.Duration   = duration;
            card.LogComment = comment;
            entity.SaveChanges();
        }
コード例 #16
0
        /**
         * Get tasks by given username
         */
        public static List <Tasks> GetTasksByUser(string username)
        {
            TimeTrackerEntities entity = new TimeTrackerEntities();
            Guid userId = entity.Users.First(el => el.Username == username).UserID;

            List <UsersTasks> tasks   = entity.UsersTasks.Select(el => el).Where(item => item.UserId == userId).ToList();
            List <Guid>       taskIds = tasks.Select(el => el.TaskId).ToList();

            return(entity.Tasks.Select(el => el).Where(id => taskIds.Contains(id.TaskId) && id.IsActive).ToList());
        }
コード例 #17
0
ファイル: TasksDAL.cs プロジェクト: Lidiq/TimeTracker
 /**
  * Edit task information
  */
 public static void EditTask(Guid id, string TaskName, string Description, DateTime start, DateTime end, int estimation, string status)
 {
     TimeTrackerEntities entity = new TimeTrackerEntities();
     Tasks task = entity.Tasks.First(el => el.TaskId == id);
     task.TaskName = TaskName;
     task.Description = Description;
     task.StartTime = start;
     task.EndTime = end;
     task.Estimation = estimation;
     task.Status = status;
     entity.SaveChanges();
 }
コード例 #18
0
        /**
         * Edit task information
         */
        public static void EditTask(Guid id, string TaskName, string Description, DateTime start, DateTime end, int estimation, string status)
        {
            TimeTrackerEntities entity = new TimeTrackerEntities();
            Tasks task = entity.Tasks.First(el => el.TaskId == id);

            task.TaskName    = TaskName;
            task.Description = Description;
            task.StartTime   = start;
            task.EndTime     = end;
            task.Estimation  = estimation;
            task.Status      = status;
            entity.SaveChanges();
        }
コード例 #19
0
        public static int GetUserSpentTimeOnTask(Guid userId, Guid taskId)
        {
            //sum duration from workcards where taskid and userid ==
            TimeTrackerEntities entity = new TimeTrackerEntities();

            if (entity.WorkCards.Any(el => el.TaskId == taskId && el.UserId == userId) == false)
            {
                return(0);
            }
            else
            {
                return(entity.WorkCards.Where(el => el.TaskId == taskId && el.UserId == userId).Sum(el => el.Duration));
            }
        }
コード例 #20
0
ファイル: CardsDAL.cs プロジェクト: Lidiq/TimeTracker
 /**
  * Create work card for a given task by the logged in user
  */
 public static void CreateCard(Guid taskId, Guid userId, DateTime start, int duration, string logComment)
 {
     TimeTrackerEntities entity = new TimeTrackerEntities();
     entity.AddToWorkCards(new WorkCards()
     {
         CardId = Guid.NewGuid(),
         UserId = userId,
         TaskId = taskId,
         StartTime = DateTime.Now,
         Duration = duration,
         LogComment = logComment
     });
     entity.SaveChanges();
 }
コード例 #21
0
        /**
         * Get the number of logged hours for an user
         */
        public static int GetUserSpentTime(Guid userId)
        {
            //sum duration from workcards by userid
            TimeTrackerEntities entity = new TimeTrackerEntities();

            if (entity.WorkCards.Any(el => el.UserId == userId) == false)
            {
                return(0);
            }
            else
            {
                return(entity.WorkCards.Where(el => el.UserId == userId).Sum(el => el.Duration));
            }
        }
コード例 #22
0
ファイル: UsersDAL.cs プロジェクト: Lidiq/TimeTracker
 public static void CreateUser(string Username, string FirstName, string LastName, string Position)
 {
     TimeTrackerEntities entity = new TimeTrackerEntities();
     aspnet_Users user = entity.aspnet_Users.First(el => el.UserName == Username);
     entity.AddToUsers(new Users()
     {
        Username = Username,
        UserID = user.UserId,
        FirstName = FirstName,
        LastName = LastName,
        Position = Position,
        IsActive = true
     });
     entity.SaveChanges();
 }
コード例 #23
0
        /**
         * Create work card for a given task by the logged in user
         */
        public static void CreateCard(Guid taskId, Guid userId, DateTime start, int duration, string logComment)
        {
            TimeTrackerEntities entity = new TimeTrackerEntities();

            entity.AddToWorkCards(new WorkCards()
            {
                CardId     = Guid.NewGuid(),
                UserId     = userId,
                TaskId     = taskId,
                StartTime  = DateTime.Now,
                Duration   = duration,
                LogComment = logComment
            });
            entity.SaveChanges();
        }
コード例 #24
0
        public static void CreateUser(string Username, string FirstName, string LastName, string Position)
        {
            TimeTrackerEntities entity = new TimeTrackerEntities();
            aspnet_Users        user   = entity.aspnet_Users.First(el => el.UserName == Username);

            entity.AddToUsers(new Users()
            {
                Username  = Username,
                UserID    = user.UserId,
                FirstName = FirstName,
                LastName  = LastName,
                Position  = Position,
                IsActive  = true
            });
            entity.SaveChanges();
        }
コード例 #25
0
        public static DateTime StartTiming(int jobTimingId)
        {
            var startTime = DateTime.Now;

            var ctx    = new TimeTrackerEntities();
            var timing = ctx.DJobTimings.FirstOrDefault(x => x.JobTimingId == jobTimingId);

            if (timing != null)
            {
                timing.StartTime = startTime;
                timing.IsRunning = true;
                ctx.SaveChanges();
                return(startTime);
            }

            throw new Exception("Could not start Timing!");
        }
コード例 #26
0
        public static JobTiming CreateNewJobTiming(int jobItemId, int developerId)
        {
            var ctx       = new TimeTrackerEntities();
            var newTiming = new DJobTiming
            {
                JobItemId   = jobItemId,
                DeveloperId = developerId,
            };

            ctx.DJobTimings.Add(newTiming);
            ctx.SaveChanges();

            JobTiming newJobTiming = new JobTiming()
            {
                DeveloperId = newTiming.DeveloperId,
                JobTimingId = newTiming.JobTimingId,
                JobItemId   = newTiming.JobItemId,
                IsRunning   = newTiming.IsRunning
            };

            return(newJobTiming);
        }
コード例 #27
0
ファイル: UsersDAL.cs プロジェクト: Lidiq/TimeTracker
 /**
  * Edit user information, username cannot be edited
  */
 public static void EditUser(string username, string FirstName, string LastName, string email, string password)
 {
     TimeTrackerEntities entity = new TimeTrackerEntities();
     Users user = entity.Users.First(el => el.Username == username);
     aspnet_Membership membershipUser = entity.aspnet_Membership.First(el => el.UserId == user.UserID);
     if (FirstName != "")
     {
         user.FirstName = FirstName;
     }
     if (LastName != "")
     {
         user.LastName = LastName;
     }
     if (email != "")
     {
         membershipUser.Email = email;
     }
     if (password != "")
     {
         membershipUser.Password = password;
     }
     entity.SaveChanges();
 }
コード例 #28
0
        public static List <JobItem> GetDailyItems()
        {
            //test comment.//testing github connection
            var ctx = new TimeTrackerEntities();

            var jobsWithTimingToday = ctx.DJobItems
                                      .Include(x => x.DCustomer)
                                      .Include(x => x.DRequestor)
                                      .Include(x => x.DDeveloper)
                                      .Where(x => x.DJobTimings.Any(y => DbFunctions.TruncateTime(y.StartTime.Value) == DbFunctions.TruncateTime(DateTime.Now)) || DbFunctions.TruncateTime(x.StartDate) == DbFunctions.TruncateTime(DateTime.Now));
            IQueryable <DJobItem> jobItemsToday = (from jobItems in jobsWithTimingToday select jobItems);

            var result = jobItemsToday.Select(x => new JobItem()
            {
                JobItemId  = x.JobItemId,
                JobTimings = x.DJobTimings.Select(y => new JobTiming()
                {
                    DeveloperId = y.DeveloperId,
                    EndTime     = y.EndTime,
                    IsRunning   = y.IsRunning,
                    JobItemId   = y.JobItemId,
                    JobTimingId = y.JobTimingId,
                    StartTime   = y.StartTime
                }).ToList(),
                Description   = x.Description,
                BillTo        = x.DRequestor.RequestorName,
                CustomerId    = (int)x.CustomerId,
                DeveloperCode = x.DDeveloper.DeveloperShortName,
                RequestedBy   = x.DRequestor.RequestorName,
                StartDate     = x.StartDate,
                EndDate       = x.EndDate
            }).ToList();

            result.ForEach(x => x.StartActiveTimer());

            return(result);
        }
コード例 #29
0
        /**
         * Edit user information, username cannot be edited
         */
        public static void EditUser(string username, string FirstName, string LastName, string email, string password)
        {
            TimeTrackerEntities entity       = new TimeTrackerEntities();
            Users             user           = entity.Users.First(el => el.Username == username);
            aspnet_Membership membershipUser = entity.aspnet_Membership.First(el => el.UserId == user.UserID);

            if (FirstName != "")
            {
                user.FirstName = FirstName;
            }
            if (LastName != "")
            {
                user.LastName = LastName;
            }
            if (email != "")
            {
                membershipUser.Email = email;
            }
            if (password != "")
            {
                membershipUser.Password = password;
            }
            entity.SaveChanges();
        }
コード例 #30
0
        public static int GetNumberOfUsersPerTask(Guid taskId)
        {
            TimeTrackerEntities entity = new TimeTrackerEntities();

            return(entity.UsersTasks.Count(el => el.TaskId == taskId));
        }
コード例 #31
0
ファイル: UsersDAL.cs プロジェクト: Lidiq/TimeTracker
 public static int GetUserSpentTimeOnTask(Guid userId, Guid taskId)
 {
     //sum duration from workcards where taskid and userid ==
     TimeTrackerEntities entity = new TimeTrackerEntities();
     if (entity.WorkCards.Any(el => el.TaskId == taskId && el.UserId == userId) == false)
     {
         return 0;
     }
     else
     {
         return entity.WorkCards.Where(el => el.TaskId == taskId && el.UserId == userId).Sum(el => el.Duration);
     }
 }
コード例 #32
0
        public static DDeveloper getDeveloperById(int devId)
        {
            var ctx = new TimeTrackerEntities();

            return(ctx.DDevelopers.FirstOrDefault(x => x.DeveloperId == devId));
        }
コード例 #33
0
        /**
         * Get all the users from the database
         */
        public static List <Users> GetUsers()
        {
            TimeTrackerEntities entity = new TimeTrackerEntities();

            return(entity.Users.ToList());
        }
コード例 #34
0
ファイル: TasksDAL.cs プロジェクト: Lidiq/TimeTracker
 /**
  * Get all the tasks, active and inactive
  */
 public static List<Tasks> GetTasks()
 {
     TimeTrackerEntities entity = new TimeTrackerEntities();
     return entity.Tasks.ToList();
 }
コード例 #35
0
ファイル: CardsDAL.cs プロジェクト: Lidiq/TimeTracker
 public static List<WorkCards> GetCardsByUser(string username)
 {
     TimeTrackerEntities entity = new TimeTrackerEntities();
     Guid userId = entity.Users.First(el => el.Username == username).UserID;
     return entity.WorkCards.Where(el => el.UserId == userId).ToList();
 }
コード例 #36
0
ファイル: UsersDAL.cs プロジェクト: Lidiq/TimeTracker
 /**
  * Get all the users from the database
  */
 public static List<Users> GetUsers()
 {
     TimeTrackerEntities entity = new TimeTrackerEntities();
     return entity.Users.ToList();
 }
コード例 #37
0
        public static Users GetUserByUsername(string username)
        {
            TimeTrackerEntities entity = new TimeTrackerEntities();

            return(entity.Users.First(el => el.Username == username));
        }
コード例 #38
0
ファイル: UsersDAL.cs プロジェクト: Lidiq/TimeTracker
 /**
  * Get all active users from the database
  */
 public static List<Users> GetAllUsers()
 {
     TimeTrackerEntities entity = new TimeTrackerEntities();
     return entity.Users.Where(el => el.IsActive).ToList();
 }
コード例 #39
0
ファイル: UsersDAL.cs プロジェクト: Lidiq/TimeTracker
 public static aspnet_Membership GetMembershipUserByUsername(string username)
 {
     TimeTrackerEntities entity = new TimeTrackerEntities();
     Guid id = entity.Users.First(el => el.Username == username).UserID;
     return entity.aspnet_Membership.First(el => el.UserId == id);
 }
コード例 #40
0
ファイル: UsersDAL.cs プロジェクト: Lidiq/TimeTracker
 public static Users GetUserByUsername(string username)
 {
     TimeTrackerEntities entity = new TimeTrackerEntities();
     return entity.Users.First(el => el.Username == username);
 }
コード例 #41
0
ファイル: TasksDAL.cs プロジェクト: Lidiq/TimeTracker
        /**
         * Get tasks by given username
         */
        public static List<Tasks> GetTasksByUser(string username)
        {
            TimeTrackerEntities entity = new TimeTrackerEntities();
            Guid userId = entity.Users.First(el => el.Username == username).UserID;

            List<UsersTasks> tasks = entity.UsersTasks.Select(el => el).Where(item => item.UserId == userId).ToList();
            List<Guid> taskIds = tasks.Select(el => el.TaskId).ToList();
            return entity.Tasks.Select(el => el).Where(id => taskIds.Contains(id.TaskId) && id.IsActive).ToList();
        }
コード例 #42
0
ファイル: UsersDAL.cs プロジェクト: Lidiq/TimeTracker
 /**
  * Get the number of logged hours for an user
  */
 public static int GetUserSpentTime(Guid userId)
 {
     //sum duration from workcards by userid
     TimeTrackerEntities entity = new TimeTrackerEntities();
     if (entity.WorkCards.Any(el => el.UserId == userId) == false)
     {
         return 0;
     }
     else
     {
         return entity.WorkCards.Where(el => el.UserId == userId).Sum(el => el.Duration);
     }
 }
コード例 #43
0
ファイル: UsersDAL.cs プロジェクト: Lidiq/TimeTracker
 /**
  * Get the number of tasks assigned to a user
  */
 public static int GetUserNumberOfTasks(Guid userId)
 {
     //count userstasks by userid
     TimeTrackerEntities entity = new TimeTrackerEntities();
     return entity.UsersTasks.Count(el => el.UserId == userId);
 }
コード例 #44
0
ファイル: UsersDAL.cs プロジェクト: Lidiq/TimeTracker
        public static List<Users> GetUsersByTaskId(Guid taskId)
        {
            TimeTrackerEntities entity = new TimeTrackerEntities();
            List<UsersTasks> all = entity.UsersTasks.Select(el => el).Where(el => el.TaskId == taskId).ToList();

            List<Guid> userIds = all.Select(el => el.UserId).ToList();
            return entity.Users.Select(el => el).Where(id => userIds.Contains(id.UserID) && id.IsActive).ToList();
        }
コード例 #45
0
        public static Tasks GetTaskById(Guid id)
        {
            TimeTrackerEntities entity = new TimeTrackerEntities();

            return(entity.Tasks.First(el => el.TaskId == id));
        }
コード例 #46
0
ファイル: CardsDAL.cs プロジェクト: Lidiq/TimeTracker
 public static WorkCards GetCardById(Guid cardId)
 {
     TimeTrackerEntities entity = new TimeTrackerEntities();
     return entity.WorkCards.First(el => el.CardId == cardId);
 }
コード例 #47
0
        /**
         * Get all active users from the database
         */
        public static List <Users> GetAllUsers()
        {
            TimeTrackerEntities entity = new TimeTrackerEntities();

            return(entity.Users.Where(el => el.IsActive).ToList());
        }
コード例 #48
0
ファイル: UsersDAL.cs プロジェクト: Lidiq/TimeTracker
 public static List<aspnet_Users> GetAllMembershipUsers()
 {
     TimeTrackerEntities entity = new TimeTrackerEntities();
     return entity.aspnet_Users.ToList();
 }
コード例 #49
0
ファイル: TasksDAL.cs プロジェクト: Lidiq/TimeTracker
 public static Tasks GetTaskById(Guid id)
 {
     TimeTrackerEntities entity = new TimeTrackerEntities();
     return entity.Tasks.First(el => el.TaskId == id);
 }
コード例 #50
0
        public static List <aspnet_Users> GetAllMembershipUsers()
        {
            TimeTrackerEntities entity = new TimeTrackerEntities();

            return(entity.aspnet_Users.ToList());
        }
コード例 #51
0
        /**
         * Get all the tasks, active and inactive
         */
        public static List <Tasks> GetTasks()
        {
            TimeTrackerEntities entity = new TimeTrackerEntities();

            return(entity.Tasks.ToList());
        }
コード例 #52
0
        public static List <DCustomer> GetCustomers()
        {
            var ctx = new TimeTrackerEntities();

            return(ctx.DCustomers.OrderBy(x => x.CustomerName).ToList());
        }
コード例 #53
0
ファイル: TasksDAL.cs プロジェクト: Lidiq/TimeTracker
 public static List<Tasks> GetAllTasks()
 {
     TimeTrackerEntities entity = new TimeTrackerEntities();
     return entity.Tasks.Where(el => el.IsActive).ToList();
 }
コード例 #54
0
        public static List <DRequestor> GetRequestors()
        {
            var ctx = new TimeTrackerEntities();

            return(ctx.DRequestors.OrderBy(x => x.RequestorName).ToList());
        }
コード例 #55
0
ファイル: TasksDAL.cs プロジェクト: Lidiq/TimeTracker
 public static int GetNumberOfUsersPerTask(Guid taskId)
 {
     TimeTrackerEntities entity = new TimeTrackerEntities();
     return entity.UsersTasks.Count(el => el.TaskId == taskId);
 }