public async Task <IGlobalCheckInfo> AddOrUpdateAsync(IGlobalCheckInfo entity) { var newEntity = GlobalCheckInfoEntity.Create(entity); await _tableStorage.InsertAndGenerateRowKeyAsDateTimeAsync(newEntity, newEntity.StartDateTime); return(newEntity); }
public async Task <IGlobalCheckInfo> AddCheckInfo(IGlobalCheckInfo info) { var entity = await _repository.AddOrUpdateAsync(info); _latestCheckTimestamp = entity.StartDateTime; return(entity); }
public static GlobalCheckInfoEntity Create(IGlobalCheckInfo src) { var entity = Mapper.Map <GlobalCheckInfoEntity>(src); entity.PartitionKey = GeneratePartitionKey(src.StartDateTime); entity.RowKey = GenerateRowKey(src.StartDateTime); return(entity); }