Example #1
0
        public void Put(long taskId, Guid userId)
        {
            var task = _taskFetcher.GetTask(taskId);

            var user = task.Users.FirstOrDefault(x => x.UserId == userId);

            if (user != null)
            {
                return;
            }

            user = _userFetcher.GetUser(userId);

            task.Users.Add(user);

            _session.SaveOrUpdate(task);
        }
        public User Get(Guid id)
        {
            var user = _userFetcher.GetUser(id);

            return(_userMapper.CreateUser(user));
        }