Ejemplo n.º 1
0
        public override ResultApiBase Get(decimal id)
        {
            var e      = Repostory.Find(id);
            var result = new TourApiResult()
            {
                Departure   = e.DEPARTURE.DESCRIPTION,
                ID          = e.ID,
                Name        = e.NAME,
                Description = e.DESCRIPTION == null ? String.Empty : e.DESCRIPTION,
                Programe    = e.PROGRAM.DETAILS,
                Destination = e.DESTINATION.NAME,
                From        = e.FROM == null ? string.Empty : e.FROM.Value.ToString("MM/dd/yyyy"),
                To          = e.TO == null ? string.Empty : e.TO.Value.ToString("MM/dd/yyyy"),
                Price       = e.PRICE
            };

            return(result);
        }
Ejemplo n.º 2
0
 public virtual T Find(Expression <Func <T, bool> > where)
 {
     return(repo.Find(where));
 }