Exemplo n.º 1
0
        public void Add(SimCardOrder order)
        {
            var sql = $"insert into {SchemaName}.{OrdersTableName}(Name, MobileId, MobileOrderId, Status, PhoneNumber) values (@Name, @MobileId, @MobileOrderId, @Status, @PhoneNumber)";

            this.connection.Execute(sql, new { order.Name, order.MobileId, order.MobileOrderId, order.Status, order.PhoneNumber }, currentTransaction.Get());
        }
Exemplo n.º 2
0
        public void IncrementAttempts(SimCardOrder order)
        {
            var sql = $"update {SchemaName}.{OrdersTableName} set Attempts=@Attempts, UpdatedAt=GETDATE() where MobileOrderId=@MobileOrderId";

            this.connection.Execute(sql, new { order.MobileOrderId, Attempts = order.Attempts + 1 }, currentTransaction.Get());
        }