diff --git a/result/dotnet/Result/Data/MySqlResultData.cs b/result/dotnet/Result/Data/MySqlResultData.cs index 8a1cbbe..3c8ed67 100644 --- a/result/dotnet/Result/Data/MySqlResultData.cs +++ b/result/dotnet/Result/Data/MySqlResultData.cs @@ -26,11 +26,11 @@ namespace Result.Data var results = connection.Query("SELECT vote, COUNT(id) AS count FROM votes GROUP BY vote ORDER BY vote"); if (results.Any(x => x.vote == "a")) { - model.OptionA = results.First(x => x.vote == "a").count; + model.OptionA = (int) results.First(x => x.vote == "a").count; } if (results.Any(x => x.vote == "b")) { - model.OptionB = results.First(x => x.vote == "b").count; + model.OptionB = (int) results.First(x => x.vote == "b").count; } model.VoteCount = model.OptionA + model.OptionB; } diff --git a/result/dotnet/Result/Pages/Index.cshtml b/result/dotnet/Result/Pages/Index.cshtml index 21a992a..4b3dcdf 100644 --- a/result/dotnet/Result/Pages/Index.cshtml +++ b/result/dotnet/Result/Pages/Index.cshtml @@ -26,12 +26,12 @@