Repo pattern ready for migrations and testing

This commit is contained in:
Fergal Moran
2018-05-11 19:17:06 +01:00
parent 728b07eddc
commit 5f905d3516
24 changed files with 258 additions and 27 deletions

View File

@@ -36,7 +36,7 @@ namespace PodNoms.Api.Controllers {
[HttpGet]
public async Task<IEnumerable<PodcastViewModel>> Get() {
var podcasts = await _repository.GetAllAsync(_applicationUser.Id);
var podcasts = await _repository.GetAllForUserAsync(_applicationUser.Id);
var ret = _mapper.Map<List<Podcast>, List<PodcastViewModel>>(podcasts.ToList());
return ret;
}