예제 #1
0
        public static LexiconEntry UpdateLexiconEntry(LexiconEntry entry)
        {
            var col = get().GetCollection <LexiconEntry>("lexiconEntries");

            col.Update(entry);
            return(entry);
        }
예제 #2
0
        public static LexiconEntry AddLexiconEntry(LexiconEntry entry)
        {
            entry.Id = Guid.NewGuid();
            var col = get().GetCollection <LexiconEntry>("lexiconEntries");

            col.Insert(entry);
            return(entry);
        }
예제 #3
0
        public override bool Equals(object obj)
        {
            LexiconEntry lexiconEntry = obj as LexiconEntry;

            if (lexiconEntry != null)
            {
                return(_uri.Equals(lexiconEntry._uri));
            }
            return(false);
        }
예제 #4
0
 public void Delete([FromBody] LexiconEntry entry)
 {
     Database.DeleteLexiconEntry(entry);
 }
예제 #5
0
 public LexiconEntry Update([FromBody] LexiconEntry entry)
 {
     return(Database.UpdateLexiconEntry(entry));
 }
예제 #6
0
 public LexiconEntry Insert([FromBody] LexiconEntry entry)
 {
     return(Database.AddLexiconEntry(entry));
 }
예제 #7
0
        public static void DeleteLexiconEntry(LexiconEntry entry)
        {
            var col = get().GetCollection <LexiconEntry>("lexiconEntries");

            col.Delete(e => e.Id == entry.Id);
        }