public async Task <IActionResult> TopupBerasAwal(int id) { DeviceDetector.SetVersionTruncation(VersionTruncation.VERSION_TRUNCATION_NONE); BotParser botParser = new BotParser(); var userAgent = Request.Headers["User-Agent"]; var result = DeviceDetector.GetInfoFromUserAgent(userAgent); ViewBag.Device = result.Match.DeviceType.ToString(); var model = new HomeModel(); if (ViewBag.Device == "smartphone") { return(await Task.Run(() => View(model))); } else { return(await Task.Run(() => View(model))); } }