Esempio n. 1
0
        public ServiceResponse <Route> SelectById(long Id)
        {
            ServiceResponse <Route> Response = new ServiceResponse <Route>();

            try
            {
                if (Id == null)
                {
                    throw new Exception("Es necesario el ID de la ruta");
                }

                Response = _repository.SelectById(Id);
                if (Response.Error)
                {
                    throw new Exception(Response.Message);
                }
            }
            catch (Exception ex)
            {
                Response.Error   = true;
                Response.Message = ex.Message;
            }
            return(Response);
        }