BinaryStudio.TaskManager.Logic.Core.ProjectProcessor.InviteUserInProject C# (CSharp) Метод

InviteUserInProject() публичный Метод

The invite user in project.
public InviteUserInProject ( int senderId, int projectId, int receiverId ) : void
senderId int /// The sender id. ///
projectId int /// The project id. ///
receiverId int /// The receiver id. ///
Результат void
        public void InviteUserInProject(int senderId, int projectId, int receiverId)
        {            
            var invitations = this.GetAllInvitationsToProject(projectId);
            if (invitations.Any(oneInvitation => oneInvitation.ReceiverId == receiverId && oneInvitation.ProjectId == projectId))
            {
                //return;
            }

            var invitation = new Invitation
                {
                    ReceiverId = receiverId,
                    SenderId = senderId,
                    ProjectId = projectId,
                    IsInvitationConfirmed = false
                };
            this.projectRepository.AddInvitation(invitation);
        }