public ActionResult SaveStats(string data) { var userStat = JsonConvert.DeserializeObject <UserStat>(data); using (var statSvc = new StatService(ConfigurationManager.ConnectionStrings["db"].ConnectionString)) { statSvc.AddStat(userStat); } return(Content("OK")); }