<commit_before>﻿using System;
using System.Collections.Generic;

using CodeIt.Data.Models;
using CodeIt.Services.Data.Contracts;

namespace CodeIt.Services.Data
{
    public class TracksService : ITracksService
    {
        public IEnumerable<Track> GetAll()
        {
            throw new NotImplementedException();
        }
    }
}
<commit_msg>Exposed service for getting all tracks.<commit_after>﻿using System.Collections.Generic;
using System.Linq;

using CodeIt.Data.Models;
using CodeIt.Services.Data.Contracts;
using CodeIt.Data.Contracts;

using Bytes2you.Validation;

namespace CodeIt.Services.Data
{
    public class TracksService : ITracksService
    {
        private readonly IEfRepository<Track> tracksRepository;

        public TracksService(IEfRepository<Track> tracksRepository)
        {
            Guard.WhenArgument(tracksRepository, nameof(tracksRepository)).IsNull().Throw();

            this.tracksRepository = tracksRepository;
        }

        public IEnumerable<Track> GetAll()
        {
            var tracks = this.tracksRepository.All.ToList();
            return tracks;
        }
    }
}

{'fraction_non_alphanumeric': 0.08776595744680851, 'fraction_numerical': 0.0008865248226950354, 'mean_word_length': 2.989399293286219, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6636470', 'n_tokens_mistral': 312, 'n_tokens_neox': 306, 'n_words': 62}