Exemplo n.º 1
0
        public JsonResult SetScores(IEnumerable <ScoreEntity> scores)
        {
            var result = ObjectService.AddEntities <ScoreEntity>(scores);

            ScoreService.SetUpdateInfo();
            return(Json(result, JsonRequestBehavior.AllowGet));
        }
Exemplo n.º 2
0
        public JsonResult AddChallenges(IEnumerable <ChallengeEntity> challenges)
        {
            var validated = challenges.Except(challenges.Where(c => c.Date == DateTimeOffset.MinValue));
            var result    = ObjectService.AddEntities(validated);

            return(Json(result, JsonRequestBehavior.AllowGet));
        }