public ActionResult Get( [BindRequired, ModelBinder( BinderType = typeof(AuthorizedAccountBinder) )] Account account) { // Authentication succeeded, send their account information return(Success( AccountRetrievalData.FromAccount(account) )); }
public async Task <ActionResult> Get(Guid id) { Account account = await _accountService.GetAsync(id); if (account == null) { return(Error( StatusCodes.Status404NotFound, new ApiError( "An account does not exist with the specified id.", ApiErrorCode.NotFound ) )); } return(Success( AccountRetrievalData.FromAccount(account) )); }