static int ScriptInsert2() { Money model = new Money() { Currency = "RUB", Amount = 1000, WorkerMoney = 1 }; DateTime startTime = DateTime.Now; MoneyService.Create(model); DateTime finishTime = DateTime.Now; return((int)(finishTime - startTime).TotalMilliseconds); }
public ActionResult Create(MoneyCreateViewModel NewMoney) { if (ModelState.IsValid) { NewMoney.Id = Guid.NewGuid(); _moneyService.Create(NewMoney); _moneyService.Save(); } ViewBag.Category = _moneyService.GetCategoryItems(); ShowMoneyListViewModel MoneyList = new ShowMoneyListViewModel(); MoneyList.MyMoney = _moneyService.DisplayPagedData(1, pageSize); ViewData["MoneyData"] = MoneyList; return(View()); }