C
C#2y ago
batsky

❔ ✅ ASP.NET Core - Implementing an API in CQRS pattern

Hey everyone, I am trying to make API integration to my ASP.NET Core app. I did something but I am not sure about is this usage is valid or not. Here is the gist of my code, and the documentation of api (you can check if you want detailed information) can you criticise and give me your opinions. https://gist.github.com/OnurSerbes/a375fc9e5edc9c199b65809d2b51bcdf https://developers.facebook.com/docs/marketing-apis/overview if you want you can share your comments in here, or to stackoverflow. https://stackoverflow.com/questions/76288515/asp-net-core-implementing-an-api-in-cqrs-pattern
Gist
Demo for HttpClient API integration
Demo for HttpClient API integration. GitHub Gist: instantly share code, notes, and snippets.
Meta for Developers
Overview - Meta Marketing API - Documentation - Meta for Developers
Learn how the Marketing APIs let you create and manage ads, generate reports, find new customers, and manage your audiences.
Stack Overflow
ASP.NET Core - Implementing an API in CQRS pattern
I am a junior ASP.NET Core developer. We have a project that uses CQRS pattern/architecture/design. Normally I can easily implement my MYSQL (with Dapper) queries to my controller without a problem...
6 Replies
Xan.Nava
Xan.Nava2y ago
string accessToken = "your-access-token"; Are you familiar with loading keys from windows environment variables? Or linux if this will live on linux.
batsky
batskyOP2y ago
not much, but in our project the special variables like tokens, keys egt. We will store them in special files like properties for security concerns This is just demo so I didn't wanted try to make security better, I will add this later. I guess you wanted to mension this right ?
Pobiega
Pobiega2y ago
That. Also, I don't think the access token should be passed into the command like this, rather fetched in the handler preferably from an IOptions<YourServiceOptions> oh, you crossposted in three places. I see. See the open #code-review post instead
batsky
batskyOP2y ago
Yes, sorry for that. I posted after I see the #code-review suggestion in general chat. I forget to close it in here
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server