public bool CreateTransaction(LoadMoneyViewModel model) { try { var _ctx = new CurrentContext(); var _transaction = new Transaction { Sum = model.Sum, Comment = model.Comment, Balance = model.Balance, PaymentMethod = PaymentMethodService.GetPaymentMethod(model.MethodId), User = _ctx.CurrentASPUser, Client = _ctx.GetClient(model.ClientId) }; _repository.CreateTransaction(_transaction); return true; } catch (Exception ex) { _validationDictionary.AddError("_FORM", "Transaction is not saved. " + ex.Message); return false; } }