Example #1
0
 public void Post(DataEventRecord dataEventRecord)
 {
     if (string.IsNullOrWhiteSpace(dataEventRecord.Timestamp))
     {
         dataEventRecord.Timestamp = DateTime.UtcNow.ToString("o");
     }
     ;
     _context.DataEventRecords.Add(dataEventRecord);
     _context.SaveChanges();
 }
Example #2
0
 public void Post(DataEventRecordDto dataEventRecord, string username)
 {
     _context.DataEventRecords.Add(new DataEventRecord
     {
         Name        = dataEventRecord.Name,
         Description = dataEventRecord.Description,
         Timestamp   = DateTime.UtcNow,
         Id          = dataEventRecord.Id,
         Username    = username
     });
     _context.SaveChanges();
 }
 public void Post(DataEventRecord dataEventRecord)
 {
     protectDescription(dataEventRecord);
     _context.DataEventRecords.Add(dataEventRecord);
     _context.SaveChanges();
 }
 public void Post(DataEventRecord dataEventRecord)
 {
     _context.DataEventRecords.Add(dataEventRecord);
     _context.SaveChanges();
 }