public IHttpActionResult SearchAccounts(DTO.SearchFilterAccount filter) { try { return(Ok(accountApp.Search(filter))); } catch (ArgumentException ex) { return(BadRequest(ex)); } catch (Exception ex) { return(InternalServerError(ex)); } }
public void OnGet(AccountSearchModel searchModel) { Roles = new SelectList(_roleApplication.List(), "Id", "Name"); Account = _accountApplication.Search(searchModel); }
public void OnGet(AccountSearchModel searchModel) { Accounts = _accountApplication.Search(searchModel); Roles = new SelectList(_roleApplication.GetRoles(), "Id", "Title"); }