public ActionResult Save(ExpenseViewModel expense) { var expenseModel = expense.To <Expense>(); if (ModelState.IsValid) { if (expenseModel.Id != default(Guid)) { _expenseApp.Update(expenseModel); } else { _expenseApp.Add(expenseModel); } } return(Json(expenseModel, JsonRequestBehavior.AllowGet)); }