public async Task <IHttpActionResult> Get() { try { var model = await _banking.GellAllAccounts(); if (model != null) { return(Ok(model)); } } catch (Exception e) { return(InternalServerError(e)); } return(NotFound()); }
public async Task <IHttpActionResult> Get(int mockId) { try { var model = await _banking.Get(mockId, true); if (model != null) { var getallmodel = await _banking.GellAllAccounts(model.Id); if (getallmodel != null) { return(Ok(getallmodel)); } } } catch (Exception e) { InternalServerError(e); } return(NotFound()); }