public ActionResult Index(TallyRecord model) { if (ModelState.IsValid) { _tallyService.Add(model); _tallyService.Save(); return(RedirectToAction("Detail")); } return(View(model)); }
public void Add(TallyRecord model) { var entity = new AccountBook() { Id = Guid.NewGuid(), Categoryyy = (int)model.Category, Amounttt = model.Money, Dateee = model.Date, Remarkkk = model.Description }; _accountBook.Insert(entity); }