Inheritance: Microsoft.WindowsAzure.StorageClient.TableServiceEntity
        public void AddReservation(ReservationAcceptedEvent reservation)
        {
            var partitionKey = reservation.Date.Date.ToString("yyyyMMdd");
            var rowKey       = reservation.Id.ToString();

            if (this.IsReplay(partitionKey, rowKey))
            {
                return;
            }

            var r = new ReservationTableEntity
            {
                PartitionKey = reservation.Date.Date.ToString("yyyyMMdd"),
                RowKey       = reservation.Id.ToString(),
                Date         = reservation.Date,
                Name         = reservation.Name,
                Email        = reservation.Email,
                Quantity     = reservation.Quantity
            };

            this.context.AddReservation(r);
            this.context.SaveChanges();
        }
        public void AddReservation(ReservationAcceptedEvent reservation)
        {
            var partitionKey = reservation.Date.Date.ToString("yyyyMMdd");
            var rowKey = reservation.Id.ToString();

            if (this.IsReplay(partitionKey, rowKey))
            {
                return;
            }

            var r = new ReservationTableEntity
            {
                PartitionKey = reservation.Date.Date.ToString("yyyyMMdd"),
                RowKey = reservation.Id.ToString(),
                Date = reservation.Date,
                Name = reservation.Name,
                Email = reservation.Email,
                Quantity = reservation.Quantity
            };

            this.context.AddReservation(r);
            this.context.SaveChanges();
        }
Exemplo n.º 3
0
 public void AddReservation(ReservationTableEntity reservation)
 {
     this.AddObject(ReservationContext.tableName, reservation);
 }
Exemplo n.º 4
0
 public void AddReservation(ReservationTableEntity reservation)
 {
     this.AddObject(ReservationContext.tableName, reservation);
 }