severian
severian
CC#
Created by severian on 1/23/2025 in #help
Need Help with a Minimal API
I am creating a simple API that takes in the values for a new microservice and stores them in a database --- eventually consumers will read the database entry and create the underlying infrastructure. There will be 3 types of services, APIs, Cron Job and Consumers. APIs and Cron Jobs will have all of the same information, but consumers need additional information related to their infrastructure needs, so I created a separate model for the consumer that still inherits the base service model. My questions: does this approach make sense? Since an API will always be a 1 for the ServiceType enum, how to do set that default value for consumers? How do I create and store a dictionary? The topics should be the key and permissions the value Thanks in advanced!
5 replies
CC#
Created by severian on 1/10/2025 in #help
Can't Update DB after following Data Access Documentation
I am following this document and am completely stuck with updating items in the DB. I am able to retrieve the data that is seeded from the DbInitializer class., but cannot add new students or edit existing ones. Normally I would search the error output but I am not getting anything or in the console either. I've compared my code with theirs and even replicated it with this repo with no luck. One thing I noticed is the program.cs is different than what gets generated by Visual Studio. Also there is no startup.cs that gets generated, it seems like that is all handled in the program.cs? Any help would greatly be appreciated.
27 replies