I have the context create it: github.com/jamesmontemagno/eShopLiteOnAspire/blob/master/Products/Data/ProductDataContext.cs Of course you can also do a migration as well.
@@JamesMontemagno but where do you ensure the table is created (productsdb)? The only thing I have to say is that AddDatabase in the AppHost is misleading to say the least... Anyway, other than that great video! :)
Every time I run my application Aspire create new docker container with DB on random port. If I cancel my application, that container with DB disappear. And this all the time, I think thats normal for Aspire. But when I fill database with some data thru app, I lost it because all the time I have new database. And I didnt find any solution for this.
@@JamesMontemagno when you run Aspire app it create container for database. When you turn off your app, that database cointainer is gone and your data too. You have to create volume to database. Please can you show how to do it. I did it by the documentation and it doenst work how it should. Storing data persist
Your EnsureDatabaseExists logic seems to run after Postgres is online, but mine seems to run sooner than that and the database has yet to be fully turned on. Weird. I'm on a 32Gb Macbook M1 Max, so I don't think it's that my system is slow or anything. Any ideas other than adding in a delay? Maybe retry numerous times and then giving up?
The audio quality of your videos is top-notch. The bass is clearly felt when listening on my car's speakers.
Drive safe and code on!
Thanks James for this video, let me try it out this weekend.
Very good explanation, saved me hours
How do we more use the cache in a service?
How it works without Connection Strings ? You don't have any connection strings in configuration.json and it still works somehow ...
aspire creates and configures the connection strings for you automatically
Hi James, I tried it and I'm getting "There is a problem loading our products. Please try again later."? How do you create the database and tables?
I have the context create it: github.com/jamesmontemagno/eShopLiteOnAspire/blob/master/Products/Data/ProductDataContext.cs
Of course you can also do a migration as well.
@@JamesMontemagno but where do you ensure the table is created (productsdb)? The only thing I have to say is that AddDatabase in the AppHost is misleading to say the least... Anyway, other than that great video! :)
@@rodrigo-5967Look at line 18 in the file he referenced.
Every time I run my application Aspire create new docker container with DB on random port. If I cancel my application, that container with DB disappear. And this all the time, I think thats normal for Aspire. But when I fill database with some data thru app, I lost it because all the time I have new database. And I didnt find any solution for this.
It should all be the same database. Hard to know without a sample but inquire on the discord maybe
@@JamesMontemagno when you run Aspire app it create container for database. When you turn off your app, that database cointainer is gone and your data too. You have to create volume to database. Please can you show how to do it. I did it by the documentation and it doenst work how it should. Storing data persist
Your EnsureDatabaseExists logic seems to run after Postgres is online, but mine seems to run sooner than that and the database has yet to be fully turned on. Weird. I'm on a 32Gb Macbook M1 Max, so I don't think it's that my system is slow or anything. Any ideas other than adding in a delay? Maybe retry numerous times and then giving up?
Checkout: github.com/davidfowl/WaitForDependenciesAspire
@@JamesMontemagno nice find. I feel like this should be front and centre in Aspire.
good one
I heard tell of an Aspire discord but haven't been able to get a working link. Do you happen to know about that? I have burning questions.
Yes! It is a channel here: aka.ms/dotnet-discord
@@JamesMontemagno my man!
xlnt!
Thanks James, what Nuget package do you recommend for Push Notifications in .Net Maui?
shiny