public IActionResult GetResistance([FromBody] ResistViewModel resistVM)
 {
     if (resistVM != null && ModelState.IsValid)
     {
         return(Ok(_CalculateResistance.CalculateResistance(resistVM.ColorA, resistVM.ColorB, resistVM.ColorC, resistVM.ColorD)));
     }
     return(BadRequest("ModelState is invalid!"));
 }
 public IActionResult Index(ResistViewModel resistVM)
 {
     if (resistVM != null && ModelState.IsValid)
     {
         resistVM.Resistance = _CalculateResistance.CalculateResistance(resistVM.ColorA, resistVM.ColorB, resistVM.ColorC, resistVM.ColorD);
     }
     return(View(resistVM));
 }