Пример #1
0
 public Location(string place, TravelDate travelDate)
 {
     this.Place = place;
     this.Date = travelDate;
 }
Пример #2
0
 public List<Request> Search(Location location, Location toLocation, TravelDate date)
 {
     string querystring =
         "from Request as R where R.Destination.Place = :destination and R.Origin.Place= :origin and R.Destination.Date.DateTime <= :date";
     IQuery query = Session.CreateQuery(querystring);
     query.SetString("destination", toLocation.Place);
     query.SetString("origin", location.Place);
     query.SetDateTime("date", date.DateTime);
     var requestList = (List<Request>) query.List<Request>();
     return requestList;
 }
Пример #3
0
 public bool Equals(TravelDate other)
 {
     if (ReferenceEquals(null, other)) return false;
     if (ReferenceEquals(this, other)) return true;
     return other.DateTime.Date.Equals(DateTime.Date);
 }