Ejemplo n.º 1
0
        public async Task <Route> GetRouteAsync(String routeName)
        {
            List <DatabaseRoute> results = await Database.QueryAsync <DatabaseRoute>("SELECT * FROM DatabaseRoute WHERE Name = ? AND RouteID <> 999 AND RouteID <> 998", new object[] { routeName });

            if (results.Count == 0)
            {
                return(null);
            }
            else
            {
                return(DatabaseRoute.ToRoute(results[0]));
            }
        }
Ejemplo n.º 2
0
        public async Task <Route> GetVisitedRoute()
        {
            List <DatabaseRoute> results = await Database.QueryAsync <DatabaseRoute>("SELECT * FROM DatabaseRoute WHERE RouteID = 998");

            if (results.Count == 0)
            {
                return(null);
            }
            else
            {
                return(DatabaseRoute.ToRoute(results[0]));
            }
        }