Spaxter
Spaxter
Explore posts from servers
CC#
Created by KidKai25 on 6/28/2024 in #help
✅ Is it a good idea to store CSS class as a property in my C# model?
I guess it's really a personal preference and there's nothing wrong with what you're doing, but IMO the back-end should not be responsible for any styling or other CSS/HTML related stuff, that's the front-ends job. The back-end provides data and the front-end decides how to render that data.
14 replies
CC#
Created by Spaxter on 6/19/2024 in #help
✅ EF Core - Not getting updated data from PostgreSQL table
Aright, turns out DBeaver which I'm using for editing the table was lying to me when it said the data was updated. After invalidating and reconnecting I saw that the value had in fact not changed. Changing the value with the psql CLI worked, thanks.
6 replies
CC#
Created by Spaxter on 6/19/2024 in #help
✅ EF Core - Not getting updated data from PostgreSQL table
I've tried manually disposing the context and changing to await using ( but none of those worked either
6 replies
CC#
Created by Spaxter on 6/19/2024 in #help
✅ EF Core - Not getting updated data from PostgreSQL table
No description
6 replies
CC#
Created by Spaxter on 6/19/2024 in #help
✅ EF Core - Not getting updated data from PostgreSQL table
No description
6 replies
CC#
Created by ChumpRumpkis on 6/18/2024 in #help
I'm new to C# and i need to know something
Visual Studio just has a bunch of built in stuff and works right off the bat with C#. If you're using VSCode you're going to need a bunch of extensions and configuration to get it to work with whatever project you have in mind.
66 replies
CC#
Created by Spaxter on 6/17/2024 in #help
DbContextFactory check for valid connection on app startup
I ended up solving it like this Program.cs
var contextFactory = app.Services.GetRequiredService<IDbContextFactory<DataContext>>();
using (var context = contextFactory.CreateDbContext())
{
context.Database.EnsureCreated();
}
var contextFactory = app.Services.GetRequiredService<IDbContextFactory<DataContext>>();
using (var context = contextFactory.CreateDbContext())
{
context.Database.EnsureCreated();
}
2 replies
DIAdiscord.js - Imagine an app
Created by Lim yujeong on 4/1/2024 in #djs-questions
Hi everyone i have a question can anyone help me?
What is your question exactly? I think you need to rephrase it
5 replies
DIAdiscord.js - Imagine an app
Created by f(x) = 1/x on 4/1/2024 in #djs-voice
addition
The difference is that getNumber gives you null which is 0 when added, while ?.value gives you undefined which will be NaN when added
26 replies
DIAdiscord.js - Imagine an app
Created by f(x) = 1/x on 4/1/2024 in #djs-voice
addition
Why not just use getNumber?
26 replies
DIAdiscord.js - Imagine an app
Created by f(x) = 1/x on 4/1/2024 in #djs-voice
addition
I also already told you to use getNumber here
26 replies
DIAdiscord.js - Imagine an app
Created by f(x) = 1/x on 3/31/2024 in #djs-questions
addition and subtraction
.get returns a CommandInteractionOption object
5 replies
DIAdiscord.js - Imagine an app
Created by f(x) = 1/x on 3/31/2024 in #djs-questions
addition and subtraction
It should be interaction.options.getNumber
5 replies
DIAdiscord.js - Imagine an app
Created by sex money feelings on 3/25/2024 in #djs-questions
How do i encrypt my token?
Why would you need an eval command publically available anyways?
51 replies
DIAdiscord.js - Imagine an app
Created by Penitent on 3/27/2024 in #djs-questions
Using collector.on('end') to edit reply?
You should edit the original interaction of the command instead, I don't believe the 'end' event callback has an interaction since the collector has ended
35 replies
DIAdiscord.js - Imagine an app
Created by Penitent on 3/27/2024 in #djs-questions
Using collector.on('end') to edit reply?
"an error" is pretty vague. What error did you get?
35 replies
DIAdiscord.js - Imagine an app
Created by Penitent on 3/27/2024 in #djs-questions
Using collector.on('end') to edit reply?
You can just set the timeout to 60000 and use
collector.on('end', (i, reason) => {
if (reason === 'time') {
// Edit your reply here
}
});
collector.on('end', (i, reason) => {
if (reason === 'time') {
// Edit your reply here
}
});
35 replies
DIAdiscord.js - Imagine an app
Created by sex money feelings on 3/25/2024 in #djs-questions
How do i encrypt my token?
Sure, but I feel like unless you absolutely need an eval command you're just overcomplicating things
51 replies