public Task <int> Add() { var tblAccount = new tblAccount { Account_Personnel_Id = DPersonnelId, Account_PaymentType_Id = DPaymentTypeId, Account_TransactionType_Id = DTransactionTypeId, AccountAmount = DAmount, AccountReceiptNumber = DReceiptNumber, AccountCurrentBalance = DCurrentBalance, AccountPaymentDate = DPaymentDate, AccountDescription = DDescription }; _dbLoanEntities.tblAccount.Add(tblAccount); _dbLoanEntities.SaveChanges(); var id = Task.Run(() => tblAccount.Id); _dbLoanEntities.spSortAccount(DPersonnelId); return(id); }