<commit_before>﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Web;
using TextDuck.Models.Entities;
using TextDuck.UF;

namespace TextDuck.Models
{
    public class FileRepository 
    {
            ApplicationDbContext Db = new ApplicationDbContext();

            public IQueryable<srtFiles> GetAllFiles()
            {
                return Db.Files;
            }

            public IQueryable<srtFiles> GetStatus()
            {
                var Status = (from item in Db.Files
                             orderby item.Title ascending
                              where item.Status == "Í vinnslu"
                             select item).Take(10);
                return Status;
            }
            public IQueryable<srtFiles> GetTexts()
            {
                var Text = (from item in Db.Files
                            orderby item.Title ascending
                            where item.Status == "Lokið"
                           select item);
                return Text;
            }
            public IQueryable<srtFiles> GetTextsByDate()
            {
                var Text = (from item in Db.Files
                            orderby item.Date descending
                            where item.Status == "Lokið"
                            select item);
                return Text;
            }
            public IQueryable<srtFiles> GetTextsByGenre()
            {
                var Text = (from item in Db.Files
                            orderby item.Genre ascending
                            where item.Status == "Lokið"
                            select item);
                return Text;
            }
            public IQueryable<srtFiles> GetTextsByCategory()
            {<commit_msg>utlit<commit_after>﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Web;
using TextDuck.Models.Entities;
using TextDuck.UF;

namespace TextDuck.Models
{
    public class FileRepository 
    {
            ApplicationDbContext Db = new ApplicationDbContext();

            public IQueryable<srtFiles> GetAllFiles()
            {
                return Db.Files;
            }

            public IQueryable<srtFiles> GetStatus()
            {
                var Status = (from item in Db.Files
                             orderby item.Title ascending
                             where item.Status == "Í vinnslu"
                             select item).Take(10);
                return Status;
            }
            public IQueryable<srtFiles> GetTexts()
            {
                var Text = (from item in Db.Files
                            orderby item.Title ascending
                            where item.Status == "Lokið"
                           select item);
                return Text;
            }
            public IQueryable<srtFiles> GetTextsByDate()
            {
                var Text = (from item in Db.Files
                            orderby item.Date descending
                            where item.Status == "Lokið"
                            select item);
                return Text;
            }
            public IQueryable<srtFiles> GetTextsByGenre()
            {
                var Text = (from item in Db.Files
                            orderby item.Genre ascending
                            where item.Status == "Lokið"
                            select item);
                return Text;
            }
            public IQueryable<srtFiles> GetTextsByCategory()
            {
{'fraction_non_alphanumeric': 0.06387114690363788, 'fraction_numerical': 0.0011108025548458762, 'mean_word_length': 1.0844907407407407, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '4419124', 'n_tokens_mistral': 874, 'n_tokens_neox': 831, 'n_words': 216}