public async Task <IActionResult> GetByIdAsync(Guid id)
        {
            var ranking = await _rankingService.GetByIdAsync(id);

            if (ranking != null)
            {
                return(Ok(RankingAdapter.ToRankingDTO(ranking)));
            }

            return(NoContent());
        }
        public async Task <IActionResult> GetAsync()
        {
            var ranking = await _rankingService.GetAllAsync();

            if (ranking.Any())
            {
                return(Ok(ranking.Select(x => RankingAdapter.ToRankingDTO(x))));
            }

            return(NoContent());
        }
Пример #3
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            _context = inflater.Context;
            _view    = inflater.Inflate(Resource.Layout.activity_fragment, container, false);
            FindViews();
            LinkEventHandlers();

            var mapFragment = (SupportMapFragment)ChildFragmentManager.FindFragmentById(Resource.Id.googleMap);

            mapFragment.GetMapAsync(this);

            _rankingLayoutManager = new LinearLayoutManager(inflater.Context);

            _rankingAdapter = new RankingAdapter();
            _rankingRecyclerView.SetLayoutManager(_rankingLayoutManager);
            _rankingRecyclerView.SetAdapter(_rankingAdapter);
            SetNewRoute();
            BindData();

            return(_view);
        }
Пример #4
0
 private void UpdateRankingForChallenge(object challengeID)
 {
     RankingAdapter.UpdateForChallenge(Convert.ToString(challengeID));
 }