<commit_before>using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace LcRest
{
    /// <summary>
    /// 
    /// </summary>
    public class JobTitleSearchResult
    {
        #region Fields
        public int jobTitleID;
        public string singularName;
        public string pluralName;
        public string description;
        public string searchDescription;
        public decimal? averageRating;
        public long totalRatings;
        public decimal? averageResponseTimeMinutes;
        public decimal? averageHourlyRate;
        public decimal? minServicePrice;
        public decimal? minHourlyRate;
        public string minServiceValue;
        public long serviceProfessionalsCount;
        #endregion

        #region Instances
        public static JobTitleSearchResult FromDB(dynamic record)
        {
            if (record == null) return record;
            return new JobTitleSearchResult
            {
                jobTitleID = record.jobTitleID,
                singularName = record.singularName,
                pluralName = record.pluralName,
                description = record.description,
                searchDescription = record.searchDescription,
                averageRating = record.averageRating,
                totalRatings = record.totalRatings,
                averageResponseTimeMinutes = record.averageResponseTimeMinutes,
                averageHourlyRate = record.averageHourlyRate,
                minServicePrice = record.minServicePrice,
                minHourlyRate = record.minHourlyRate,
                minServiceValue = record.minServiceValue,
                serviceProfessionalsCount = record.serviceProfessionalsCount
            };
        }
        #endregion

        #region Fetch
        public static dynamic SearchByJobTitleAutocomplete(string searchTerm, Locale locale)
        {
            using (var db = new LcDatabase())
            {
                return db.Query(@"
                DECLARE @searchTerm AS varchar(150)
                SET @searchTerm = @0
                DECLARE @LanguageID int  
                SET @LanguageID = @1
                DECLARE @CountryID int
                SET @CountryID = @2

                SELECT TOP 25
                    PositionID as jobTitleID
                    ,PositionSingular as singularName
                    ,PositionDescription as description
                FROM
                    positions
                WHERE
                    LanguageID = @LanguageID<commit_msg>Added searchDescription property to the job-title autocomplete results #718<commit_after>using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace LcRest
{
    /// <summary>
    /// 
    /// </summary>
    public class JobTitleSearchResult
    {
        #region Fields
        public int jobTitleID;
        public string singularName;
        public string pluralName;
        public string description;
        public string searchDescription;
        public decimal? averageRating;
        public long totalRatings;
        public decimal? averageResponseTimeMinutes;
        public decimal? averageHourlyRate;
        public decimal? minServicePrice;
        public decimal? minHourlyRate;
        public string minServiceValue;
        public long serviceProfessionalsCount;
        #endregion

        #region Instances
        public static JobTitleSearchResult FromDB(dynamic record)
        {
            if (record == null) return record;
            return new JobTitleSearchResult
            {
                jobTitleID = record.jobTitleID,
                singularName = record.singularName,
                pluralName = record.pluralName,
                description = record.description,
                searchDescription = record.searchDescription,
                averageRating = record.averageRating,
                totalRatings = record.totalRatings,
                averageResponseTimeMinutes = record.averageResponseTimeMinutes,
                averageHourlyRate = record.averageHourlyRate,
                minServicePrice = record.minServicePrice,
                minHourlyRate = record.minHourlyRate,
                minServiceValue = record.minServiceValue,
                serviceProfessionalsCount = record.serviceProfessionalsCount
            };
        }
        #endregion

        #region Fetch
        public static dynamic SearchByJobTitleAutocomplete(string searchTerm, Locale locale)
        {
            using (var db = new LcDatabase())
            {
                return db.Query(@"
                DECLARE @searchTerm AS varchar(150)
                SET @searchTerm = @0
                DECLARE @LanguageID int  
                SET @LanguageID = @1
                DECLARE @CountryID int
                SET @CountryID = @2

                SELECT TOP 25
                    PositionID as jobTitleID
                    ,PositionSingular as singularName
                    ,PositionDescription as description
                    ,PositionSearchDescription as searchDescription
                FROM
                    positions
                WHERE
                    LanguageID = @LanguageID
{'fraction_non_alphanumeric': 0.05107115531752104, 'fraction_numerical': 0.0036342769701606732, 'mean_word_length': 1.6801640184520759, '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': '4906017', 'n_tokens_mistral': 1249, 'n_tokens_neox': 1130, 'n_words': 312}