예제 #1
0
 public virtual void Enroll(User user, Project project, string role)
 {
     throw new System.NotImplementedException();
 }
예제 #2
0
 private void MergeOrCreateSession(WorkSession session, Project project, User user)
 {
     var lastSession = project.WorkSessions.Where(x => x.EndTime == session.StartTime && x.UserId == user.Id).SingleOrDefault();
     if (lastSession == null)
     {
         session.ProjectId = project.Id;
         session.UserId = user.Id;
         DbContext.WorkSessions.Add(session);
     }
     else
     {
         lastSession.EndTime = session.EndTime;
     }
 }