public virtual void Enroll(User user, Project project, string role) { throw new System.NotImplementedException(); }
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; } }