private void LogEntry(StoredPlates stored) { db.EntryLogs.Add(new EntryLog() { Plate = stored.Plate, Time = DateTime.Now.Ticks, Outcome = stored.Action }); db.SaveChanges(); }
public void AddStoredPlate([FromBody] StoredPlates plate, [FromHeader] string plateBefore) { var edit = db.StoredPlates.Where(x => x.Plate == plateBefore); if (edit.Count() != 0) { db.StoredPlates.Remove(edit.FirstOrDefault()); } db.StoredPlates.Add(plate); db.SaveChanges(); }