Asp.Net Mvc : User Registration And Login Form Using Entity FrameWork And Sql Server

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone today I will explain you how to build a simple user registration and login form that will allow user to register and log in log out using asp.net MVC and entity framework text open the visual studio create a new project yes right on this treasure hunt long play center select an empty project embassy and click OK let's open that rascal surfer so would you create that database and table [Music] connect just open the database of right click on Dada Dada this new not ours so here if we use B but a Dutch name is pre user TV okay first click that a schema that go to the schema right click new schema is not will be user and enter this object click ok now we are going to get table pad click on table the river first column will be user ID and we right-click and make it a grand Ricky thanks to you first [Music] tie-down bump or column negative created on 10 table name will be users the schema we use that identity column maybe the user ready to save it now you have triggered one type of this right-click and suppress and you will give that table that table name is user dot users just open the solution Explorer right-click and create one folder to add that into the framework so we teaching model right click on TV model and add new item data eg dot edit it in water it will use a new model just press ENTER select their grid if number designer from database niched new connection just copy the server name from here on there select the SQL conjugation user and our swar set up there whatever that is we user DB click OK it hears next next and select the term from here will be user to click on finish now ITT flavor is adding to project so the folder of DB model no it's injector so yeah you can see that all those column that user ID first name last name email password and get it on now create that one one model that will be user mode it will be that user ID first name last name email address then our date time created later on okay so they put the user first name and password and password now we will add that one validation that will be required using using system dot component model data prior notice so here the user ID is not required because it's of auto number so first name is demand so here you can dine on Lao and history will be false next one will be the error message so here they cannot touch name is you higher same you have to copy for last time so you need to change that error message ask 95 and email address password confirm password that office is required that password and confirm password so he had that password then the icon traffic on it direct icon this will be the password proper discipline fish prosper and one more thing is Bennett that for match so it should match with that so this one that confirm prospects would be paired with that property name is password so becomes their text it will compare that one that both of them password and confirm password okay now it's that where it is our part is done now we are going to create one controller that is with that right click on controller select controller method select MVC five controller empty controller just write down the name that will do the home controller okay and one more controller will be at account controller that for login registration so first we'll give that all those that will be about that common personality what this one will give that a power and another one will perform a contract such as to right click add that in there they're select a few then add that new and for about us a right-click on the about an Advil that will be the add one more view that will be about and one what is that contact right click and that will be the contact now open that layout view that that will be you will find in that share folders that we just view go to the view and see at folder then you'll find that layout view so here you can change that when that major path to that once done it will fill run right now see here there is no link so we'll clean it first really clear that one thing that home laying contact about then here then the right top side will add that resistor and Abhiyan this a deal you I [Music] like you ul is already there then I'll add that Ally then copy this one this one this one only need to change that up this is not make it null this one this one also make it known and the instead of application we are going to write here home and heat index and home another one you will with the contact so it will be touch down to the contact and this one also that X and M will also it will be contact the next one will be the Wow so this one alpha will go out and tell the name of the precursor to the double user my ass we talked about some I use our equation and here my user finish first second and marinate I can see here there is a home contact and about like this side we are going to add that one that was stuck in nothing so both of you sir but the 8:1 a parcel dude that is the noble loving person that right-click on the CL for that ad and view that make it this one who is that welcome partial unmake it is a person who this letter that it has a partial and keep content so he and you can design there huh that I do l and that class will be coming up right right so yeah that excellently at and I just removed a fraction do first we'll add that one that controller that is account account controller so here quickly upon excellent a battle to the resistor excellent result that will be the resistors return you so here and right click at that that we'll look at is missing from another one with a login form so go to the account controller so add here that will do that login so add that admin and plugin now you change that for that log in PowerShell here it will be make a register and that will be extending will be the wrist pollard name will be that account on this one without below again that same will copy this this one for login login Sanga link text will be volume go to the ELA now so here the title and as tabletop parcel so that parcel means we will name this login underscore faster login parcel just take a look now where it's coming back to our departure sort of become this side o 30 areas can be so you'll move to the same line just close this one solid this is it sort of become here deadlock across a run it she was looking for something that I said here once the clay that I stir see that he was going to them account after his death once you go to click on like below then he was going to back the count long yeah okay now we are going to create that one that I just checked off so he had that right so now we are going to do open that registered Electro's all stuff other government there is a count controller so for that once you are going to get there to register so here the actor will come that user model in to pass that all you some water [Music] just pass this one to you here also have to come there to model fully qualified name we approached this one is now going to create that legit [Music] so one more we'll call that up axonal turn but this one will be that post method make it as a post post so here same thing utilize this one will come from that view so that begin from that's asking that first one with the action that register second one with the controller name that will be the account and third one will be the type for method for matter the cost [Music] now here going to play the table then we have first carnival with that TV this one way back st without cable for first me and then one more TV back one for xbox used to power this I catch box for Xbox Wii mode right such that so for the first at home so becomes that text box yeah this one is but the form here we change that one that mean display name display it will last one to confirm password going to change again that copy there yeah mutant in space first name space seen a coffeepot last night the end it will be lasting and one more is that last one after that email then password and last on the confirm password I can already hear address under this one repeat the password type that it will be a cocktail box type in the password and this one a section as well yes minimize it so when more row we are going to add here therefore error message so TD make a column spend little bit to overhear that error message that where it is a message or seem like an order model drug question so here it will become them fill this in message before that to become routes this one isn't about see you can adhere now we'll create that button that submit and reset button [Music] you add to submit and we're loose it will be register another one time Arkadiy will with that she said [Music] see it's coming but we should move to here in the disparate what about that package box so what we can do here this so we can happen to be here and columns where they know that car has paint colors and is not referred to them now chip the Civic and repress yeah I don't need you to change that one because I like restoring their first name first name so this hasn't been but you're supposed to be lastly just we have copied forgot to change this ours okay so now now what we will do will make a play point here you fill that out and make a break point here just make your defender and let's see that once I will enter that archive that value is coming on first there will be that will be see second level XY check email baby sleep password is place this register yeah it's coming here so now check that out eyes on me yeah you drive around that all the data is coming here now I will try to save that run using that one entity framework will save the data so just close that application right here let's change the first entity name of that data model and today they might user to be entities so we'll create that object of user do entities just add the reference obz dot user so here so it's asking that a DP modern user entity so create that object object refuses to go to that term what's the name of users this week users but only his user only not users so now it'll be that user so you use that god created on this pipe rotate time but now without in it equal to object northern dot X dot in here like this one to be adhered and one more thing into that cat got sleep changes here dot in the first name [Music] I will say that one this one you want to see no need to return anything freshmen shape that modern state is valued one more problem we are going to need to be an actual with the error message and that here that string message that is subsystem so again these successful says one said it will be successfully registered so we add object user model but success message I see then the database the data is M key is no data here if resistor you can see XY that you click on register I have checked in that database am I losing so only this message we have to return and display in the view I will do this message there success message also displeasing the register making one more row yeah aunt Edie and there it will be PDF college plan little bit oh just email dark and that it will be the model at water such that mod of that mess with success message [Music] this interesting dr. lett EVC 1x by Jade 1 a PC when you see one dot gmail.com and password makes possible to be an interpreter so check that one but now check the data it's inserted or not no instance at the data here also we can share this the editor not add one more time BC to final work contact love in this subtree our little divisor added man will shape them that long [Music] so open that word login page that Excel can account controller then long so he already designed that login same like at a register plural Kasim so this one will go to that clogging accept and detective you may also post method so here we go to check the account controller and we all need to add that one more that will be the postman ever ask you to be pushed and I also need to pass on user model otherwise we'll get get on clans are larger because this merced akka is not required at that all those field so better will create that one models adhering again three at home for that user login model and they're there to field only the email and another with the password that you have in water so this one going to add into that account controller register so if we create that object of a load model mother need to file this when look who so that lobby that has came out here that model and that will be qualified name that with that dot java model now again that here to create xbox one table then yeah we pretty go to the HTML dart textbook on live at four [Music] modern such htech model or email and I'm about TP [Music] far more touch such that the same like you have to ask for password so here it will be the passer but that this one will be that passport for then again that year the anteater with - sorry - condom that input time with the subway [Music] both is required for it so now again go to the log intoxication HTML and we add one more PR so to display that one that adder the TD one more TD which tml message validation message model such that model dot email seem to copy fur and then that class all that same when you have to copy fur password I'll see that TR one more TLD be here that on that peak isn't is check the account control in here or you're passing yeah this one you are returning that object and this one that flight model will come here rupees L on the model of a neuron application you can pocket I click on login' so you are getting that message with password now we'll click on login so we'll check that that proper data system engines cut order or not this we make a breakpoint here [Music] [Music] so from here we'll check that was that make you validation that object is [Music] object [Music] as well to inject murder the password for that equal so here we check that if it's null if does not equal not my second return some value once it will turn that means it's a success otherwise understate ad model error [Music] is not magic written like that so the time that gave you the friction of age if it's a null if it's not null then if it's not null message that username or password is success that time will return to them so we will add season CSUN that email spell to this one count so say so I will add like that the processor added so return to that okay so if it's match then modulus rated at modern era if you will if well it is I will model studies each minute then it will begin to to the here we will check that one if both are if he email ID and password will match here it will be not match much like it will return null then it will add that one model straight but I want to add this one and if it will be successful then it will address a sin and read added to that language so to tell you that at work site first one is that index that is that and second one is the controller and home that index with excellent method time in depth it will be winter and one more thing we are going to change brush it will change this one this one will work so we change something in layout width so that in the right top corner it will be display that one that email id so get one working you two and 30 marking very some message that or make a breakpoint here that a login module here first unit that wrong information with this hey I got it the new table and pass out 1 2 3 let's see soo-ji edit is coming because it's not matching so it's going kita email password is not matching so the immanent password is not matching make yourself in go like that email and password is invalid or the embedded simulator password magic SWAT so here it's amazing that let's check that the fee will enter that correct information just run [Music] click on logo we have something where everyone just copy the to be part is 1 2 3 push enter the pass 1 1 2 s level which sort redirect to that all this lengthens one more time so this coming here don't you that with our 2x and this one is not going to homepage okay next we'll check that when this one say send out e-mail just close that we will check in the layout place that they are taught as team here here we check that it says and our e-mail equal to 1/3 and as that an instructive register so we have to remove that registered one so as you step this one should not display so we will add one only one two condoms just copy this one and that has TM l excellently detached while we'll be trying and compare that one sis and dot mail this and so it should not target it's too direct to go in depth and here own page once you will click that one that message just like he'll go through that long and dark one more control at home controller home dot will disturb it will come here okay I can go to that and next one this one will give that log out so log out it will be go to the log out H and theta they found out lock out business with people also if you click that one log R it has two things so to come here okay it fits with Nell that season it will be null then it will be good it will be displayed there on top right corner it will display the register and login if it not null then it will display that one that a particular person who are login and one more accent by URL will be like that Onix ending it will be logout so this one we have to create that longer or the log out here what we'll do so we'll check that one that one of the strategies is invalid for just take the plugin here yes we're trying without I will not run the application so not here you can see here here's every step and login okay once you click on login just click on London and enter the email ID and password and password will be one two three or one two three password just click on login now you can see here hi Praveen will make his face here and log out he's also taken love out okay logout pastry straight neck huh it will be redirect to that login page say sir 31 then and redirect to excellent to go to that or return on the return view on the return view is that one more thinking little bit need to make a space click on longer sing copy that from TV and password m23 just internet logging so now I can see them - that log of this coming I click on logout rev it or need to change that one again absent owner robert czyszczon is I go to that home so here need to change that [Music] [Music] love it moving to logout so also getting back up and again love it once you ever just cut up a new user [Music] password is 1 2 3 and I found powder and Butley just keep under sister likes a resistor will go to the mall to that home pace that once the exit edges tab it will redirect to the home page here [Music] [Music] i J see exactly faster than 50 totally just click my register page tab and try to log in at revzilla.com I saw it is not dirty just click on login you can see there ok my work with a logout login one more thing we can take to fix some use that is already registered so if you try to register it will keep that one message at error message so go to the account whatever you are a string so here so from here first we'll check just we are same we have to copy here if it's tonight register as here you can't act like AC model similar to copy and paste into the register page or password is not is not so need to remove that when that password because in that log in via check in that password also but in the control account we no need to check the password only that you have to check that here on leaning to take that email this remove this one but again you can check with that exist everybody I'm checking with that email only ok if external that which is not exist so it will be adhered if it is not that it will be returned that error message or any method also you can use register I'm taking that email address this already exists so it sorta see email our email is already exist because this one is already exist if it's not exist can we use that in your breath trap now change this one to any any make adapt Mundek application this resistor you see see who is already exist or it's a different one so I just take now you can see large one is register now you can use for that login I hope it's it clear so one more time we'll review that one first we have rated that home page that is a home home controller and go to the controller so we added that only that a common thing that is in deaths that omeone and about an contacts in that account Alto that we have added that one that registered and when what register for HTTP POST and seemed like a login and one log is not post that one and when both is that one action method is logout so once I have created that entity data model so firstly we are passing that one that for a gesture so let's point to that register view so go to that registered so you have designed that one register so we all this we are adding here and seem like FR login on so now in the log in third partial or that possible we ve used because this becomes our common values and because we have done here that we make a separate view or that you can use in the layout also but we can make either separate because every of us has some Kody so later if you want I want to change that some more functionality we are going to want to add so we can add in the only we have to change in the another person because once a year open that log our layout page it will is it getting a little bit big so that is why you have me upon a separate view so here I'm checking that one if it is is enough so it should display their front at register and login if it's SSN is not none so it should be displayed at high message with that email what is a season and when log out as you click on log out you should go to the account controller and that it will believe that all the systems what they get happy created and it's due to they that had put them over as that login panel so we are taking that one real cheeky with that we are conditioned if it's a null or you can check here with that any method also so because any it will return that boolean so but here I'm showing you that if I said equal to cut to null that would smell you email at it and act password this invalid but if if it's a login is successful it is going to the ad in that session and it added to the homepage I hope it's it we have thanks for watching and please don't forget to subscribe like and comment if you have any question please write down in a permit thank you
Info
Channel: Tek Tuition
Views: 42,536
Rating: undefined out of 5
Keywords: Asp.Net Mvc : User Registration And Login Form Using Entity FrameWork And Sql Server, login page using entity framework in mvc 5, registration form in mvc using entity framework, login form using entity framework c#, login and registration form in asp.net mvc with database, login and registration form in asp.net mvc 5, login form in asp.net mvc 5, create a login page in mvc 4 using entity framework, registration form in mvc 5 using entity framework
Id: aWX77vN1e3U
Channel Id: undefined
Length: 78min 37sec (4717 seconds)
Published: Wed Oct 10 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.