public async Task AddAsync(string userId, ProductInfo productInfo) { productInfo.Id = DateTime.Now.Ticks; productInfo.RowKey = productInfo.Id.ToString(); productInfo.PartitionKey = userId; await _repository.Insert(productInfo); }
public async Task AddAsync(long productId, ProductInfoHistory history) { history.Id = DateTime.Now.Ticks; history.RowKey = history.Id.ToString(); history.PartitionKey = productId.ToString(); await _repository.Insert(history); }
public async Task <Post> Add(Post entity) { entity.PartitionKey = GetPartitionKey(entity); entity.RowKey = Guid.NewGuid().ToString(); await azureTableStorage.Insert(entity); return(entity); }
public async Task Insert(InsertVehicleDetailsInput input) { if (Guid.Empty == input.VehicleId) { throw new ArgumentNullException("Empty vehicle id"); } await _repository.Insert(_mapper.Map <VehicleDetails>(input)); }
public async Task AddAsync(UserProfile userProfile) { userProfile.Id = DateTime.Now.Ticks; userProfile.RowKey = userProfile.Id.ToString(); userProfile.PartitionKey = userProfile.UserId; userProfile.LastNotificationEmailSendOn = DateTime.Now.AddDays(-1); await _repository.Insert(userProfile); }
/// <summary> /// /// </summary> /// <param name="model"></param> /// <returns></returns> public async Task <bool> SaveComment(CommentRequest model) { model.PartitionKey = "MapApp"; model.RowKey = model.Email; await _repository.Insert(model); return(true); }
public async Task CreateAsync(Note record) { var newRecord = new JsonValueTableEntity { Value = record.ToJson(), PartitionKey = PartitionKey, RowKey = record.RowId }; await _repository.Insert(newRecord); }
public async Task <IActionResult> OnPostAsync() { if (!ModelState.IsValid) { return(Page()); } this.InsertedCustomer.RowKey = Guid.NewGuid().ToString(); await TableStorage.Insert(tableName, this.InsertedCustomer); return(RedirectToPage(routeName)); }
public async Task <IActionResult> Privacy() { var currentUser = await _context.Users.FirstOrDefaultAsync(u => u.UserName == User.Identity.Name); var date = DateTime.UtcNow; //UTC para evitar problemas var reverseTicks = string.Format("{0:D19}", DateTime.MaxValue.Ticks - date.Ticks); //Formateado a la misma cantidad de dÃgitos var log = new Log(currentUser.Id, reverseTicks) { Message = $"User has opened Privacy page at ({date.ToLongDateString()})" }; await _logStorage.Insert(log); return(View()); }
public async Task SaveBlogInfo(Blog blog) { blog.RowKey = "primary"; blog.PartitionKey = "blogs"; var exists = await azureTableStorage.GetItem("blogs", "primary"); if (exists != null) { await azureTableStorage.Update(blog); } else { await azureTableStorage.Insert(blog); } }
public async Task WriteData() { var result = GetTempDataAsync(); try { var item = new JsonValueTableEntity() { Value = result, PartitionKey = "partitionKey", RowKey = Guid.NewGuid().ToString() }; await _azure.Insert(item); } catch (Exception ex) { Console.WriteLine(ex.Message); } }
public async Task <bool> AddQueue(PickupQueue queue) { queue.Name = queue.Name.ToLowerInvariant(); return(await _client.Insert(queue)); }
public Task SaveAsync(SensorDataMessage message) { return(repository.Insert(message)); }
public async virtual Task Insert(T entity) { await tableStorage.Insert(entity); }
public async Task <bool> Save(ulong guildId, string host, int port = default) { return(await _client.Insert(new Server(guildId, host, port))); }
public async Task <bool> Flag(IGuildUser user, string reason) { return(await _client.Insert(new FlaggedSubscriber(user) { Reason = reason })); }
public void Warning(LoggingWarningMessage message) { _warningRepository.Insert(message); }
public void Informational(LoggingInfoMessage message) { _informationalRepository.Insert(message); }
public void Error(LoggingErrorMessage message) { _errorRepository.Insert(message); }
public void Debug(LoggingDebugMessage message) { _debugRepository.Insert(message); }