public static LexiconEntry UpdateLexiconEntry(LexiconEntry entry) { var col = get().GetCollection <LexiconEntry>("lexiconEntries"); col.Update(entry); return(entry); }
public static LexiconEntry AddLexiconEntry(LexiconEntry entry) { entry.Id = Guid.NewGuid(); var col = get().GetCollection <LexiconEntry>("lexiconEntries"); col.Insert(entry); return(entry); }
public override bool Equals(object obj) { LexiconEntry lexiconEntry = obj as LexiconEntry; if (lexiconEntry != null) { return(_uri.Equals(lexiconEntry._uri)); } return(false); }
public void Delete([FromBody] LexiconEntry entry) { Database.DeleteLexiconEntry(entry); }
public LexiconEntry Update([FromBody] LexiconEntry entry) { return(Database.UpdateLexiconEntry(entry)); }
public LexiconEntry Insert([FromBody] LexiconEntry entry) { return(Database.AddLexiconEntry(entry)); }
public static void DeleteLexiconEntry(LexiconEntry entry) { var col = get().GetCollection <LexiconEntry>("lexiconEntries"); col.Delete(e => e.Id == entry.Id); }