✅ Model view controller web app + SQL
hi im tryna make a signup page but the details i etner dont get uploaded to my sql database
39 Replies
heres the signup controller im using
@ZZZZZZZZZZZZZZZZZZZZZZZZZ i moved to the more recent version now but have some issues
Why don't you want to use Entity framework?
its old af and i was struggling with it a lot even in connecting css with the cshtml files
but i had the databse there working fine
You can still use dbContext to execute raw queries if you wanted to
whats that?
in entity frameorrk or the one im using ?
entity framework
I think there's some confusion, based on @Cumet 's last thread, I think they think you're talking about .NET framework
@Cumet why dont u add some logs to your code so that u know if its even reaching your sql query in first place
do u even know if it hits the query at all
if it fails?
nope
well then add some logging first
i'd like to but how can i add that
Logging in .NET Core and ASP.NET Core
Learn how to use the logging framework provided by the Microsoft.Extensions.Logging NuGet package.
alternatively u can just $debug your code
Tutorial: Debug C# code and inspect data - Visual Studio (Windows)
Learn features of the Visual Studio debugger and how to start the debugger, step through code, and inspect data in a C# application.
if its running in your pc the later might be simpler to do
ok thx ill check ito ut
@Cumet are u ok, did u find the issue?
were u able to debug/add the logger
are u stuck?
It worked yes
Thanks
nice glad to hear u were able to solve it 🙂
I'm just stressed af tho 💀
Thx
its ok since u were gone thou u just gave up or something
We have until 31 March to finish the project and they didn't even finish teaching us c# and all the labs needed 😿
welcome to college/uni where teachers be teachers
Lmao
just be glad they didn't tell u to use webforms
anyway throw a /close if ur fine with closing this request 😉
Idk what that is but I don't think it can be worse than this 💀
Ight
Can i keep it for future questions i might have some soon or do i need to open new one for new question@leowest
sure if its related to this, otherwise u can always open a thre #help either is fine
some ancient web tech
Ty
@leowest hi are u free rn and can help ?
i want to make a login page now and dont know where to start from (mostly getting confused of how i can fitch details from the databse) in order to check if they're valid or not etc...
i already finished the signup page too
if its something I know... but whenever u @ some one for help, please do post the question and details before ahead 😉
ok
so ill create a new controller called signin
but then idk how to do anything with pulling datafrom the database
if any1 know where i can find info or can tell me where to start from ill appericate it
well normally you use DI (dependency injection) to provide what is needed
like these?
istg uni is useless af
did not learn that yet
yeah basically you register a service in your di that your controller can then request
could be db, or some api or something else
ight
ill work on it for a bit then go bed cuz its 4 am
lol
yeah no worries
Dependency injection into controllers in ASP.NET Core
Discover how ASP.NET Core MVC controllers request their dependencies explicitly via their constructors with dependency injection in ASP.NET Core.
ty