12345678910111213141516171819202122232425262728293031 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using TourAgent.Views;
- namespace TourAgent.Models
- {
- public partial class Otel
- {
- UP_SmirnovContext db = new UP_SmirnovContext();
- public string CountryName
- {
- get
- {
- return db.Countries.Where(x => x.Code == CountryCode).Select(x=>x.Name).FirstOrDefault();
- }
- }
- public int AmountTours
- {
- get
- {
- List<OtelOfTour> HotelForAmount = db.HotelOfTours.ToList();
- HotelForAmount = HotelForAmount.Where(x => x.HotelId == Id).ToList();
- return HotelForAmount.Count;
- }
- }
- }
- }
|