Example #1
0
 /// <summary>
 /// Insert Email Pool table into table.
 /// </summary>
 /// <param name="context"><see cref="EmailDbContext"/></param>
 /// <param name="emailPool">Dynamic row data</param>
 private static void SeedEmailPool(EmailDbContext context, dynamic emailPool)
 {
     context.EmailPools.Add(new EmailPoolTable
     {
         ID   = emailPool.id,
         Name = emailPool.name
     });
     context.SaveChanges();
 }
Example #2
0
 /// <summary>
 /// Insert Email Channel data into table.
 /// </summary>
 /// <param name="context"><see cref="EmailDbContext"/></param>
 /// <param name="emailChannel">Dynamic row data</param>
 private static void SeedEmailChannel(EmailDbContext context, dynamic emailChannel)
 {
     context.EmailChannels.Add(new EmailChannelTable
     {
         ID              = emailChannel.id,
         Key             = emailChannel.key,
         EmailPoolID     = emailChannel.emailPoolID,
         EmailProviderID = emailChannel.emailProviderID
     });
     context.SaveChanges();
 }
Example #3
0
 /// <summary>
 /// Insert Email Provider Settings data into table.
 /// </summary>
 /// <param name="context"><<see cref="EmailDbContext"/>/param>
 /// <param name="emailProvider">Dynamic row data</param>
 private static void SeedEmailProvider(EmailDbContext context, dynamic emailProvider)
 {
     context.EmailProviders.Add(new EmailProviderSettingsTable
     {
         ID            = emailProvider.id,
         Type          = emailProvider.type,
         Configuration = emailProvider.configuration,
         EmailPoolID   = emailProvider.emailPoolID,
         Name          = emailProvider.name
     });
     context.SaveChanges();
 }
Example #4
0
 /// <summary>
 /// Insert Email template data into table.
 /// </summary>
 /// <param name="context"><see cref="EmailDbContext"/></param>
 /// <param name="emailTemplate">Dynamic row data</param>
 private static void SeedEmailTemplate(EmailDbContext context, dynamic emailTemplate)
 {
     context.EmailTemplates.Add(new EmailTemplateTable
     {
         ID              = emailTemplate.id,
         Name            = emailTemplate.name,
         EmailPoolID     = emailTemplate.emailPoolID,
         MessageTemplate = emailTemplate.messageTemplate,
         Variant         = emailTemplate.variant,
         Sender          = emailTemplate.sender
     });
     context.SaveChanges();
 }