コード例 #1
0
 public ActionResult Edit(int?id)
 {
     if (!id.HasValue)
     {
         return(RedirectToAction("Index", "cfgPlayGames"));
     }
     else
     {
         var leagues = _leagues.Get(id.Value);
         return(View(leagues));
     }
 }
コード例 #2
0
        public static Option <Betfair.Model.Football.ThreeWayOdd> Map(Smarkets.Entity.Match match)
        {
            Option <string> xx = default;

            try
            {
                xx = lrepo.Get("Smarkets", match.League, "BetfairName");
            }
            catch (Exception ex)
            {
                return(Option.None <Betfair.Model.Football.ThreeWayOdd>());
            }

            //Console.WriteLine("found match");

            return(GetOdds(match).LastOrNone().FlatMap(o => xx.Map(x =>

                                                                   new Betfair.Model.Football.ThreeWayOdd
            {
                EventDate = new DateTime(match.Start),
                Competition = x,
                CompetitionId = string.Empty,
                MarketId = match.EventId.ToString(),
                Player1Odd = (int)o.home,
                Player2Odd = (int)o.away,
                Player3Odd = (int)o.draw,
                Player1Id = 1,
                Player2Id = 2,
                Player1Name = string.Empty,
                Player2Name = string.Empty,
                OddsDate = new DateTime(o.time),
            })));
        }
コード例 #3
0
        public static Option <Betfair.Model.Football.ThreeWayOdd> Map(Smarkets.Entity.Match match)
        {
            Option <string> xx = default;

            try
            {
                xx = lrepo.Get("Smarkets", match.League, "BetfairName");
                if (string.IsNullOrEmpty(xx.ValueOr(string.Empty)))
                {
                    return(default);