mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
add List.GetByName() to repo
This commit is contained in:
parent
315efebfbe
commit
2e15301e4e
2 changed files with 6 additions and 0 deletions
|
|
@ -6,5 +6,6 @@ namespace FilterLists.Data.Repositories.Contracts
|
|||
public interface IListRepository
|
||||
{
|
||||
IEnumerable<List> GetAll();
|
||||
List GetByName(string listName);
|
||||
}
|
||||
}
|
||||
|
|
@ -19,5 +19,10 @@ public IEnumerable<List> GetAll()
|
|||
{
|
||||
return _filterListsDbContext.List.AsEnumerable();
|
||||
}
|
||||
|
||||
public List GetByName(string listName)
|
||||
{
|
||||
return _filterListsDbContext.List.First(x => x.Name == listName);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue