Salman
Salman
CC#
Created by gwon8266 on 11/21/2024 in #help
Solution to remove previous migrations and use a new migration without dropping database.
maybe delete all the previous migrations and then apply the new one again but not sure if it'd work though .. in such cases I also just drop the db lol
2 replies
CC#
Created by Grault on 11/15/2024 in #help
Blazor WASM: Injecting a service
are you trying to use that clientside component in a server component ?
22 replies
CC#
Created by Xymanek on 11/15/2024 in #help
Blazor WASM + prerender - handling forms on client & server
btw there's a dedicated blazor channel in Dotnet Evolution you can ask it there as well : https://discord.com/channels/732297728826277939/732297874062311424
8 replies
CC#
Created by Xymanek on 11/15/2024 in #help
Blazor WASM + prerender - handling forms on client & server
so far I've not used WASM myself and only used server components so I dont know how longer it takes to load. But in the demos of the ongoing conference, it loaded pretty quickly , but again I've no idea how long it usually takes
8 replies
CC#
Created by Xymanek on 11/15/2024 in #help
Blazor WASM + prerender - handling forms on client & server
tbh Idk. I would just not display the form if WASM isn't loaded yet and would show some loading spinners or skeletons
8 replies
CC#
Created by Xymanek on 11/15/2024 in #help
Blazor WASM + prerender - handling forms on client & server
I think I don't understand the question properly but about this :
I definitely prefer to have WASM handle the initial submission for interactive validation, status display, etc
Yes you can do that in WASM by using built in blazor validation...and submit the form only if the inputs are valid according to your validation rules i.e your View Model . And you submit the data to the server through API calls
8 replies
CC#
Created by Hatred An8el on 11/13/2024 in #help
✅ How does dependencies works ?
30 replies
CC#
Created by Hatred An8el on 11/13/2024 in #help
✅ How does dependencies works ?
30 replies
CC#
Created by Hatred An8el on 11/13/2024 in #help
✅ How does dependencies works ?
Yes
30 replies
CC#
Created by StilauGamer on 11/13/2024 in #help
Inject IDbContextFactory or DbContext directly?
Although I never had any problem with Blazor and I use DBContext without factory
15 replies
CC#
Created by StilauGamer on 11/13/2024 in #help
Inject IDbContextFactory or DbContext directly?
15 replies
CC#
Created by Hatred An8el on 11/13/2024 in #help
✅ How does dependencies works ?
wait for at least 5-7 minutes, if someone doesn't show up then can share your thread link in #chat
30 replies
CC#
Created by StilauGamer on 11/13/2024 in #help
Inject IDbContextFactory or DbContext directly?
15 replies
CC#
Created by Hatred An8el on 11/13/2024 in #help
✅ How does dependencies works ?
Hm..I'm not sure tbh. I'd let someone else take the case
30 replies
CC#
Created by StilauGamer on 11/13/2024 in #help
Inject IDbContextFactory or DbContext directly?
I've never seen it, normally you register it like I showed you above
15 replies
CC#
Created by StilauGamer on 11/13/2024 in #help
Inject IDbContextFactory or DbContext directly?
for example in Program.cs before building the app you register it like this:
builder.Services.AddDbContext<ApplicationDbContext>(options =>
options.UseSqlServer(connectionString));
builder.Services.AddDbContext<ApplicationDbContext>(options =>
options.UseSqlServer(connectionString));
And then inject it using constructors wherever you want
15 replies