Finished adding user support and ability to update specific novels or set your last read chapter

This commit is contained in:
2022-07-17 20:34:06 -04:00
parent e4529e11c0
commit b5c4146d4d
34 changed files with 589 additions and 59 deletions

View File

@@ -84,8 +84,18 @@ public abstract class BaseRepository<TEntityType> : IRepository<TEntityType> whe
return GetAllIncludedQueryable().FirstOrDefault(predicate);
}
public virtual async Task<IEnumerable<TEntityType?>> GetWhereIncluded(IEnumerable<TEntityType> entities)
{
return await GetWhereIncluded(entities.Contains);
}
public virtual async Task<IEnumerable<TEntityType>> GetWhereIncluded(Func<TEntityType, bool> predicate)
{
return GetAllIncludedQueryable().AsEnumerable().Where(predicate);
}
public virtual async Task PersistChanges()
{
await DbContext.SaveChangesAsync();
}
}