Пример #1
0
        public async Task <Result> SendInvitation(ManagerInvitation managerInvitation, string serviceSupplierName)
        {
            var companyInfo = await _companyService.Get();

            return(await _mailSender.Send(_options.Value.ManagerInvitationMessageTemplateId, managerInvitation.Email, new InvitationData
            {
                InvitationCode = managerInvitation.InvitationCode,
                ManagerEmail = managerInvitation.Email,
                ManagerName = $"{managerInvitation.FirstName} {managerInvitation.LastName}",
                Position = managerInvitation.Position,
                Title = managerInvitation.Title,
                ServiceSupplierName = serviceSupplierName,
                CompanyInfo = companyInfo.IsFailure
                    ? new CompanyInfo()
                    : companyInfo.Value
            }));
        }
 static Result <string> GetInvitationCode(ManagerInvitation managerInvitation)
 => managerInvitation.InvitationCode;