Create Login in WPF, MVVM Pattern, C# and SQL Server - Step by Step + Display user data

preview_player
Показать описание
⏮️ Previous Video: WPF UI/ Design a Modern Login Form/ Introducing to WPF

⏭️ Next Video: WPF & MVVM/ Modern Main UI Design

🎞️ Hi, in this tutorial we will learn how to Create Login Form in WPF, MVVM Pattern, C# and SQL Server, additionally we will display the data of the current user in the main window.
Content:
00:00 Introduction to MVVM
02:18 Database
02:53 Implement View Models
03:25 ViewModel Base Class (INotifyPropertyChanged)
04:20 ViewModel Command Class (ICommand)
06:33 Login ViewModel Class
11:44 Set Binding between the View & ViewModel
13:49 Create a Bindable PasswordBox (Dependency Property)
19:50 Implement Models
20:33 Implement Data Access Objects
26:28 Register the user in the Thread
27:33 Configure Application Startup
30:19 Retrieve and Display user data (Again using MVVM)

⬇️ DOWNLOAD PROJECT

📲 Social Media:

#WPF #MVVM #LoginForm #SQL #ModernForm #modernui #design #CSharp #VisualBasic #VB.NET #VisualStudio #Custom #Chart #FlatUI #Desktop
Рекомендации по теме
Комментарии
Автор

I truly appreciate you ... this is an awesome tutorial. And breaking down the MVVM principles like this is golden. Thank you.

kunleth
Автор

Just started developing using WPF, your tutorials really helped me a lot 👍👍👍

Just wanted to share @ 25:22
Instead of writing : validUser = command.ExecuteScalar() == null ? false : true;

I used : validUser = command.ExecuteScalaer() != null;

Your_Better_You
Автор

Learn from an expert. Wonderful tutorials for professional also

entemolu
Автор

I feel blessed learning from this channel. I have simply a general enquiry as a newbie sql learner.
I realized recently that i may need to write in languages other than sql on the database engine, like, python, C#
What is the best practice to integrate several languages inside the same database management software.
Should i look forward to a particular text editor or is there other features that may facilitate multi-language integrations inside database system.

hasanmougharbel
Автор

I'm a french student in IT and your tuto helped me so much, tank you !!

ilianabenchikh
Автор

First of all thanks for your given time for this tutorial.
I'm developper since 8 years now and MVVM seems so much complicated and so many things to add and re add etc i'm a little lost with so many classes.

Juste for asking, why don't you use Datasets to interact with the SQL ?
you create the same object to be as the database is but you only have 4 fileds is it worth it with a complete database in real life ?

sonpowa
Автор

Great video, I learned a lot from it!
However, I noticed that there is a problem on the login View.
If you run the app and click close without logging in, an exception will be thrown. How to solve it?

robertorinaldi
Автор

Hi. Your video is just amazing. But if I did everything in one window? That is, from the authorization UserControl I can open the UserControl
registration or UserControl navigation menu depending on what the user will do in UserControl authorization. How to implement it?

ryweiyr
Автор

Great videos sir !!!
please can teach us how to deploy a winforms app in local area network(LAN)? thanks...

josaphatkayombo
Автор

excellent video. the best I've found so far for practical project walkthroughs that include best practices. I followed along without issue and at the end I'm finding an issue that is hard to debug. the login command is not triggering the "username or password is incorrect" or the view change event. hard to debug. I understand what is happening in the code, but not sure how to correct it. any suggestions?

ZacharyRodney
Автор

Please keep going with this series. you videos are some of the best out there. Thank you

MrJuche
Автор

Aw, you jumped on WPF, guess Ill need to catch up on you when I learn more of windows forms. :)

janslanina
Автор

"Hello, I recently came across your videos on C-Sharp WPF tutorials. I'd like to ask, should I start watching from the MVVM playlist, or from the WPF playlist?"

huihui
Автор

Does someone know how to create a sql server ? I have an error when I try to connect to my database

Elta
Автор

what If I want to use a command parameter? how can I do that?

deakattila
Автор

i cannot connect to my sql, my name sever is SQLEXPRESS so _connectionString = @"Server=SQLEXPRESS; Database=MVVMLoginDb; Integrated Security=True".Is that right?

tuannguyenvanquoc
Автор

Could you help how to create user roles and privileges?
as an administrator, access to everything
managing member with access to everything but the administrator can modify something
and Ordinance with access to everything else the administrator will modify manually.

wsilvawgt
Автор

Could you help me to synchronize with SQL Server Management Studio in WPF, MVVM Pattern, C#
I can't, I created the same form as you, I modified it my way but I can't connect to SQL Server Management

wsilvawgt
Автор

It's what I'm looking. Thank you! Also I'm wondering; It's possible OAuth2 login system using Google/Discord API? I Searched too long but i didn't find anything... Can you give me a referance or advice?

miyano
Автор

I've done several tests and I'm not sure if it's the right method. If anyone wants, they can correct me. I use wpf core 8
from: _connectionString = "Server=(local); Database=MVVMLoginDb; Integrated Security=true";
to: _connectionString = "Server=(local); Data Database=MVVMLoginDb; Integrated Security=true";
On a remote server I have no idea how to do it. I'm just starting out.
Then I made this change.
Id = reader[0].ToString();
From an error. I noticed that integers are not generated in the db. The error is that it cannot be converted from int to string. I put a cast (int) and it throws an error. Removing id, it works. I don't know how to change this.

SirLuke