12345678910111213141516171819202122232425262728293031 |
- 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;
- }
- }
- }
- }
|