public async Task <ActionResult> ConfigureTariff(TariffViewModels tariff) { if (ModelState.IsValid) { List <Tariff> updateTariffList = new List <Tariff>(); Tariff dotTariff = new Tariff() { TariffType = TariffType.TOD, Rate = tariff.TOD }; Tariff normalTariff = new Tariff() { TariffType = TariffType.Normal, Rate = tariff.Normal }; updateTariffList.Add(dotTariff); updateTariffList.Add(normalTariff); if (await client.ConfigureTariff(updateTariffList)) { return(RedirectToAction("Index", "Home")); } } return(View(tariff)); }