public override int Run(string[] remainingArguments) { try { FormatOutput.Logins(_uow, new List <E_Login> { _login }); Console.Out.WriteLine(); Console.Out.Write(" *** Enter 'yes' to delete login *** : "); var input = StandardInput.GetInput(); Console.Out.WriteLine(); if (input.ToLower() == "yes") { _ = _service.Login_DeleteV1(_login.Id) .Result; } return(StandardOutput.FondFarewell()); } catch (Exception ex) { return(StandardOutput.AngryFarewell(ex)); } }
public override int Run(string[] remainingArguments) { try { if (_isEnabled.HasValue) { _login.IsEnabled = _isEnabled.Value; } if (_isDeletable.HasValue) { _login.IsDeletable = _isDeletable.Value; } var login = _service.Login_UpdateV1(_map.Map <LoginV1>(_login)) .Result; FormatOutput.Logins(_uow, new List <E_Login> { _map.Map <E_Login>(login) }, true); return(StandardOutput.FondFarewell()); } catch (Exception ex) { return(StandardOutput.AngryFarewell(ex)); } }
public override int Run(string[] remainingArguments) { try { var expression = QueryExpressionFactory.GetQueryExpression <E_Issuer>(); if (!string.IsNullOrEmpty(_filter)) { expression = expression.Where(x => x.Name.Contains(_filter)); } _logins = _uow.Logins.Get(expression.ToLambda(), new List <Expression <Func <E_Login, object> > >() { x => x.UserLogins, }) .TakeLast(_count); FormatOutput.Logins(_uow, _logins.OrderBy(x => x.Name)); return(StandardOutput.FondFarewell()); } catch (Exception ex) { return(StandardOutput.AngryFarewell(ex)); } }
public override int Run(string[] remainingArguments) { try { FormatOutput.Logins(_uow, new List <E_Login> { _login }, true); return(StandardOutput.FondFarewell()); } catch (Exception ex) { return(StandardOutput.AngryFarewell(ex)); } }
public override int Run(string[] remainingArguments) { try { var login = _service.Login_CreateV1( new LoginV1() { Name = _loginName, IsEnabled = true, IsDeletable = true, }).Result; FormatOutput.Logins(_uow, new List <E_Login> { _map.Map <E_Login>(login) }); return(StandardOutput.FondFarewell()); } catch (Exception ex) { return(StandardOutput.AngryFarewell(ex)); } }