public void Add( int partitionId, long?emailSenderUserId, string @from, string[] to, string[] copyTo, string subject, string body, bool isBodyHtml, byte[] files) { _executor.Execute( "[dbo].[EmailMessage_Add]", new { State = EmailMessageState.New, partitionId, @from, To = EmailMessageData.Join(to), CopyTo = EmailMessageData.Join(copyTo), subject, body, isBodyHtml, files, emailSenderUserId }); }
private EmailMessageData Add(int partitionId) { var data = _fixture.Build <EmailMessageData>() .With(x => x.EmailSenderUserId, TestConstants.TestAdminUserId) .With(x => x.To, EmailMessageData.Join(_fixture.CreateMany <string>())) .With(x => x.CopyTo, EmailMessageData.Join(_fixture.CreateMany <string>())) .Without(x => x.Id) .Create(); _messages.Add( partitionId, data.EmailSenderUserId, data.From, EmailMessageData.Split(data.To), EmailMessageData.Split(data.CopyTo), data.Subject, data.Body, data.IsBodyHtml, data.Files); return(data); }