public bool AddEvidence(EvidenceEntity entity) { if (Exists(entity.RowKey)) { return(false); } try { TableOperation insertOperation = TableOperation.Insert(entity); table.Execute(insertOperation); return(true); } catch (Exception e) { Trace.TraceError($"ERROR: {e.Message}"); return(false); } }
public bool ReplaceEntity(EvidenceEntity entity) { if (!Exists(entity.RowKey)) { return(false); } try { TableOperation replaceOperation = TableOperation.Replace(entity); table.Execute(replaceOperation); return(true); } catch (Exception e) { Trace.TraceError($"ERROR: {e.Message}"); return(false); } }
public bool DeleteEntity(String rowKey) { if (!Exists(rowKey)) { return(false); } try { EvidenceEntity entity = RetriveSingleEvidence(rowKey); TableOperation deleteOperation = TableOperation.Delete(entity); table.Execute(deleteOperation); return(true); } catch (Exception e) { Trace.TraceError($"ERROR: {e.Message}"); return(false); } }