/// <summary> /// Get all movies async /// </summary> /// <returns>Task<List<Movie>></returns> public async Task <List <Movie> > GetMoviesAsync() { List <Movie> movies = await movieRepo.GetAllAsync(); movies.ForEach(async m => m.FileType = await fileTypeRepo.GetByIdAsync(m.FileTypeId)); return(await movieRepo.GetAllAsync()); }
/// <summary> /// Get FileType by Id async /// </summary> /// <param name="fileTypeId"></param> /// <returns>Task<FileType></returns> public async Task <FileType> GetFileTypeByIdAsync(int fileTypeId) { return(await fileTypeRepo.GetByIdAsync(fileTypeId)); }