implemented account detail and transactions#9
implemented account detail and transactions#9MamtaNallaretnam wants to merge 1 commit intomasterfrom
Conversation
codebyrpp
left a comment
There was a problem hiding this comment.
Once you have made the changes let me know, I'll handle the conflicts.
| public DateTime Date { get; set; } | ||
| public TransactionType Type { get; set; } | ||
| public string Recipient { get; set; } | ||
| public decimal Amount { get; set; } |
| public class Account | ||
| { | ||
| public string AccountNumber { get; set; } | ||
| public decimal Balance { get; set; } |
| string connectionString = "connectionString"; | ||
|
|
||
| using (SqlConnection connection = new SqlConnection(connectionString)) |
There was a problem hiding this comment.
only this parts you have to change by using the AppDbContext, the rest seems ok to me
|
|
||
| namespace BankingSystem.DbOperations; | ||
|
|
||
| public List<Transaction> GetAccountTransactions(string accountNumber) |
There was a problem hiding this comment.
this should be
public class TransactionRepository : ITransactionRepositoryThere was a problem hiding this comment.
make an interface for this class also,
public class ITransactionRepository
{
public List<Transaction> GetAccountTransactions(string accountNumber);
}There was a problem hiding this comment.
Implement this class using an interface.
Check the comment I have made about the TransactionRepository.cs file.
| public TransactionController() | ||
| { | ||
| repository = new TransactionRepository(); | ||
| } |
There was a problem hiding this comment.
Can you check you how to properly initialize the repository as I have done in the master branch.
You can see how it's done in most of the controllers.
Also, inorder to do so, you have a code line in the Program.cs file. Here's the part you have to check in that file.
services.AddScoped<IUserRepository, UserRepository>();
services.AddScoped<IAuthenticationService, AuthenticationService>();
services.AddScoped<IIndividualRepository, IndividualRepository>();
// Add you respository here
No description provided.