public Result <SavingAccount> Get(int id) { var result = new Result <SavingAccount>(); SavingAccountService SavingAccountService = new SavingAccountService(); result.Value = SavingAccountService.Get(id); result.IsSuccess = true; return(result); }
public Result <IList <SavingAccount> > GetAll(int plannerId) { var result = new Result <IList <SavingAccount> >(); SavingAccountService SavingAccountService = new SavingAccountService(); result.Value = SavingAccountService.GetAll(plannerId); result.IsSuccess = true; return(result); }
public Result Delete(SavingAccount savingAccount) { var result = new Result(); try { SavingAccountService SavingAccountService = new SavingAccountService(); SavingAccountService.Delete(savingAccount); result.IsSuccess = true; } catch (Exception exception) { result.IsSuccess = false; result.ExceptionInfo = exception; } return(result); }