Ejemplo n.º 1
0
 public IEnumerable <JMDictEntry> Lookup(string v)
 {
     return(kvps
            .IncludeAll()
            .FindOne(kvp => kvp.LookupKey == v)
            ?.Values
            ?.Select(e => e.To(s => s.To())));
 }
Ejemplo n.º 2
0
 public IEnumerable <JnedictEntry> Lookup(string key)
 {
     return(kvps
            .IncludeAll()
            .FindOne(kvp => kvp.LookupKey == key)
            ?.Entries
            ?.Select(e => new JnedictEntry(
                         e.SequenceNumber,
                         e.Kanji,
                         e.Reading,
                         e.Translation.Select(t => new JnedictTranslation(t.Type, t.Detail)))));
 }
Ejemplo n.º 3
0
        protected Task <TResult> ExecuteAsync <TResult>(Func <TResult> func)
        {
            TResult result = default(TResult);

            using (var database = new LiteDatabase(connectionString))
            {
                try
                {
                    Collection = database.GetCollection <TEntity>();
                    Collection.IncludeAll();
                    result = func();
                }
                catch (Exception ex)
                {
                }
            }

            return(Task.FromResult(result));
        }
Ejemplo n.º 4
0
 public List <T> FilterCollection <T>(LiteCollection <T> baseColl, Query query)
 {
     return(baseColl.IncludeAll().Find(query).ToList());
 }
 protected LiteCollection <T> BaseAll()
 {
     //return Collection.FindAll();
     return(Collection.IncludeAll());
 }
Ejemplo n.º 6
0
 public List <Deck> GetDecks()
 {
     return(_db_decks.IncludeAll().FindAll().ToList());
 }
Ejemplo n.º 7
0
 public LiteCollection <T> IncludeAll(int maxDepth = -1)
 {
     return(LiteCollection.IncludeAll(maxDepth));
 }