Changed db stuff
This commit is contained in:
@@ -19,4 +19,19 @@ public class NovelRepository : BaseRepository<Novel>, INovelRepository
|
||||
.Include(i => i.Tags);
|
||||
}
|
||||
|
||||
public async Task<Novel?> GetNovel(string url)
|
||||
{
|
||||
return await GetIncluded(i => i.Url == url);
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<Novel>> LookupNovelsByName(string name)
|
||||
{
|
||||
return await GetWhereIncluded(n => n.Title.Contains(name));
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<Novel>> LookupNovelsByTag(string tag)
|
||||
{
|
||||
return await GetWhereIncluded(n => n.Tags.Any(nt => nt.TagValue.Contains(tag)));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user