コード例 #1
0
 public AdminServices(IDynamoDbContext <UserServicesItem> dynamodbContext, IDynamoDbContext <UserDetails> dynamoDbUserContex, IDynamoDbContext <BookDetails> dynamoDBBookContext, IDynamoDbContext <InventoryHistory> dynamoDbHistoryContex, IMailService mailService, IMapper mapper)
 {
     this._dynamodbContext       = dynamodbContext;
     this._dynamoDBBookContext   = dynamoDBBookContext;
     this._dynamoDbUserContex    = dynamoDbUserContex;
     this._dynamoDbHistoryContex = dynamoDbHistoryContex;
     this._mailService           = mailService;
     this._mapper = mapper;
 }
コード例 #2
0
        /// <summary>
        /// Compatibility method. Saves an entity in a way that AWS .NET SDK does.
        /// </summary>
        /// <param name="context"></param>
        /// <param name="entity"></param>
        /// <param name="cancellationToken"></param>
        /// <typeparam name="TEntity"></typeparam>
        /// <remarks>
        /// Check SaveAsync compatibility section for details:
        /// https://alloczero.github.io/EfficientDynamoDb/docs/dev-guide/sdk-compatibility#operations
        /// </remarks>
        public static async Task SaveAsync <TEntity>(this IDynamoDbContext context, TEntity entity, CancellationToken cancellationToken = default) where TEntity : class
        {
            using var httpContent = new UpdateItemSaveHttpContent <TEntity>(context.Config, entity);

            await context.ExecuteAsync <object>(httpContent, cancellationToken).ConfigureAwait(false);

            if (httpContent.HasVersion)
            {
                httpContent.SetIncrementedVersion();
            }
        }
コード例 #3
0
 public UserRepository(IDynamoDbContext dbContext)
 {
     _dbContext = dbContext;
 }
コード例 #4
0
 public AccountServices(IDynamoDbContext <UserDetails> context, IMapper mapper, IMailService mailService)
 {
     this._context     = context;
     this._mapper      = mapper;
     this._mailService = mailService;
 }
コード例 #5
0
 public InventoryServices(IDynamoDbContext <UserServicesItem> dynamouserService, IDynamoDbContext <BookDetails> dynamoDbContext, IDynamoDbContext <InventoryHistory> dynamoDbHistoryContex)
 {
     this._dynamoDbBookContext   = dynamoDbContext;
     this._dynamoDbHistoryContex = dynamoDbHistoryContex;
     this._dynamouserServices    = dynamouserService;
 }
コード例 #6
0
 public ProfileServices(IDynamoDbContext <UserDetails> dynamodbUserContext, IMapper mapper)
 {
     this._dynamodbUserContext = dynamodbUserContext;
     this._mapper = mapper;
 }
コード例 #7
0
 public UserServices(IDynamoDbContext <UserServicesItem> dynamodbContext, IDynamoDbContext <UserDetails> dynamoDbUserContex, IDynamoDbContext <BookDetails> dynamoDBBookContext)
 {
     this._dynamodbContext     = dynamodbContext;
     this._dynamoDBBookContext = dynamoDBBookContext;
     this._dynamoDbUserContex  = dynamoDbUserContex;
 }
コード例 #8
0
        /// <summary>
        /// Compatibility method. Deletes an entity in a way that AWS .NET SDK does.
        /// </summary>
        /// <param name="context"></param>
        /// <param name="entity"></param>
        /// <param name="cancellationToken"></param>
        /// <typeparam name="TEntity"></typeparam>
        /// <remarks>
        /// Check DeleteAsync compatibility section for details:
        /// https://alloczero.github.io/EfficientDynamoDb/docs/dev-guide/sdk-compatibility#operations
        /// </remarks>
        public static async Task DeleteAsync <TEntity>(this IDynamoDbContext context, TEntity entity, CancellationToken cancellationToken = default) where TEntity : class
        {
            using var httpContent = new DeleteEntityHighLevelHttpContent <TEntity>(context.Config, entity);

            await context.ExecuteAsync <object>(httpContent, cancellationToken).ConfigureAwait(false);
        }
コード例 #9
0
 public ContactsRepository(IDynamoDbContext dbContext)
 {
     _dbContext = dbContext;
 }
コード例 #10
0
 public ReminderServices(IDynamoDbContext <InventoryHistory> dynamoDbHistoryContex, IMailService mailService)
 {
     this._dynamoDbHistoryContex = dynamoDbHistoryContex;
     this._mailService           = mailService;
 }
コード例 #11
0
 public CustomerDao(IConfiguration config, IDynamoDbContext <CustomerModel> customerContext)
 {
     _customerContext     = customerContext;
     _customerDynamoTable = config.GetSection("DynamoDbTables:Customer").Value;
 }