public string InitializeTransaction(TableTransactionVM data)
        {
            if (data == null)
            {
                throw new ArgumentNullException(nameof(data));
            }

            TableTransaction transactionData = new TableTransaction
            {
                Id        = Guid.NewGuid().ToString("N"),
                IpAddress = data.IpAddress,
                UserId    = data.UserId,
                CreatedAt = DateTime.Now,
            };

            DbContext.Add(transactionData);
            DbContext.SaveChanges();

            return(transactionData.Id);
        }
Ejemplo n.º 2
0
 public TableCellTransaction(MarkdownWriter writer, TableTransaction table)
 {
     _writer = writer;
     _table  = table;
 }