public async Task <IHttpActionResult> GetTransactionByUsername(string username) { try { var transactionApi = new TransactionApi(); var UserManager = Request.GetOwinContext().GetUserManager <ApplicationUserManager>(); var user = await UserManager.FindByNameAsync(username); var userId = user.Id; var listTransaction = transactionApi.GetTransactionByUserId(userId); return(Json(new { result = listTransaction, success = true, })); } catch (Exception ex) { return(Json(new ResultModel { success = false, })); } }