public IActionResult Upload(IFormFile file) { List <MenuJson> menus = new List <MenuJson> { }; SumsModel sums = new SumsModel { }; using (StreamReader r = new StreamReader(file.OpenReadStream())) { string json = r.ReadToEnd(); menus = JsonConvert.DeserializeObject <List <MenuJson> >(json); } sums = _menuBLL.Calculate(menus); return(View(sums)); }