using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace UPtur.Models
{
    public partial class Hotel
    {
        UpPrytovContext DB = new UpPrytovContext();
        public string CountryName
        {
            get
            {
                return DB.Countries.Where(x => x.Code == CountryCode).Select(x => x.Name).FirstOrDefault();
            }
        }

        public int AmountTours
        {
            get
            {
                List<HotelOfTour> HotelForAmount = DB.HotelOfTours.ToList();
                HotelForAmount = HotelForAmount.Where(x => x.HotelId == Id).ToList();
                return HotelForAmount.Count;
            }
        }

    }
}
