public void ImportFromJson(String filePath) { Int32 deleted = repository.DeleteAllDeposits(); String json = System.IO.File.ReadAllText(filePath); IEnumerable<Deposit> deposits = JsonConvert.DeserializeObject<IEnumerable<Deposit>>(json); Int32 added = repository.AddDeposits(deposits); TempData["message"] = $"{deleted.ToString()} deposits were deleted. {added.ToString()} deposits were added"; }