Esempio n. 1
0
        //private IQueueClient _queueClient;

        public JokeData(CatalystDbContext context, IEmailer emailer, IJokeRecipientData recipientData)
        {
            _recipientData = recipientData;
            _emailer       = emailer;
            //_queueClient = queueClient;
            _context = context;
        }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PersonService"/> class.
 /// </summary>
 /// <param name="context">
 /// The <see cref="ICatalystDbContext"/>.
 /// </param>
 /// <param name="cache">
 /// The <see cref="ICacheManager"/>.
 /// </param>
 /// <param name="logger">
 /// The <see cref="ILogger"/>.
 /// </param>
 public PersonService([Inject(Constants.Database.ConnectionStringName)] CatalystDbContext context, ICacheManager cache, ILogger logger)
     : base(context, cache, logger)
 {
     // Fill in the slug on add
     this.Adding += (s, e) => { e.Entity.Slug = GetUniqueSlug(e.Entity); };
     this.Saving += (s, e) =>
     {
         if (!e.Entity.Slug.StartsWith(e.Entity.GenerateSlug()))
         {
             e.Entity.Slug = GetUniqueSlug(e.Entity);
         }
     };
 }
Esempio n. 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CatalystDbContextServiceBase{TEntity}"/> class.
 /// </summary>
 /// <param name="context">
 /// The context.
 /// </param>
 /// <param name="cache">
 /// The cache.
 /// </param>
 /// <param name="logger">
 /// The logger.
 /// </param>
 /// <exception cref="ArgumentNullException">
 /// Throws on any argument null
 /// </exception>
 protected CatalystDbContextServiceBase(CatalystDbContext context, ICacheManager cache, ILogger logger)
     : base(context, cache, logger)
 {
 }
Esempio n. 4
0
 public JokeRecipientData(CatalystDbContext context)
 {
     _context = context;
 }