public IActionResult Index([FromBody] TemperaturaRequest request) { if (string.IsNullOrEmpty(request.Temperatura)) { return(Json(new { Temperatura = 0 })); } var model = new Models.Temperatura().Insert(new Models.Temperatura.TemperaturaModel { Temperatura = float.Parse(request.Temperatura, System.Globalization.CultureInfo.GetCultureInfo("en-US")) }); return(Json(new { Temperatura = request.Temperatura })); }
public IActionResult Index() { var model = new Models.Temperatura().Select(); return(View(model)); }