Skip to content
This repository has been archived by the owner on Jun 25, 2022. It is now read-only.

Commit

Permalink
refactor(back-end): Delete unnecessary method
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlosPavajeau committed Apr 28, 2021
1 parent 5b6d959 commit fa11d32
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Core/Domain/IRepositoryBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public interface IRepositoryBase<T, in TKey> where T : class
IQueryable<T> Where(Expression<Func<T, bool>> expression);

void Insert(T entity);
T FindById(TKey id);

Task<T> FindByIdAsync(TKey id);
void Update(T entity);
void Delete(T entity);
Expand Down
7 changes: 1 addition & 6 deletions Domain/Repositories/RepositoryBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace Kaizen.Domain.Repositories
{
public abstract class RepositoryBase<T, TKey> : IRepositoryBase<T, TKey> where T : class
{
protected ApplicationDbContext ApplicationDbContext { get; set; }
protected ApplicationDbContext ApplicationDbContext { get; }

protected RepositoryBase(ApplicationDbContext applicationDbContext)
{
Expand All @@ -37,11 +37,6 @@ public virtual void Update(T entity)
ApplicationDbContext.Set<T>().Update(entity);
}

public virtual T FindById(TKey id)
{
return ApplicationDbContext.Set<T>().Find(id);
}

public virtual async Task<T> FindByIdAsync(TKey id)
{
return await ApplicationDbContext.Set<T>().FindAsync(id);
Expand Down

0 comments on commit fa11d32

Please sign in to comment.