Part 11- Insert data into database in ASP.NET MVC | Submit a Form and Save Record | HD Video

  Рет қаралды 133,948

Technotips Ashish

Technotips Ashish

Күн бұрын

Пікірлер: 110
@SergeyChaschin
@SergeyChaschin 6 жыл бұрын
Lad, please, either pause your Avast during your videolectures or provide a dislaimer that this video may be harmful for people with heart problems (or they can get those at 6:51). I've lost a month of life at 6:51 and still have this bell ringing in my head. Speaking about the lecture itself -- thanks a lot, well done. But a thrilling one :).
@aapkanigam
@aapkanigam 6 жыл бұрын
Oh sorry for the inconvenience.. at starting, I did not have idea about how it can put impact on people and left it as it is. Please don't watch part 10 also .. it's more hilarious😂
@carloscatral
@carloscatral 6 жыл бұрын
😂😂😂😂
@GlassScissors
@GlassScissors 5 жыл бұрын
Great tutorial, but Ashish you scared the living !@$% out of me with that Avast notification. :D
@saurabhvarma29
@saurabhvarma29 5 жыл бұрын
@@aapkanigam speaker per tha laptop....main bhi ek baar darr gya tha..hahahahhahaha
@AyoubElAlaouiX_O
@AyoubElAlaouiX_O 4 жыл бұрын
@@aapkanigam You can actually add a note on the video so the viewers can watch out
@seanpereira5824
@seanpereira5824 2 жыл бұрын
This is just what I needed to get my confidence back..god bless you mate..do this with music in ur ears..works like a charm bro!!
@dafringe
@dafringe 6 жыл бұрын
Excellent tutorials, thus far. Thank you for taking the time to make these videos!
@aapkanigam
@aapkanigam 6 жыл бұрын
Thanks .. keep learning and sharing
@albasula216
@albasula216 4 жыл бұрын
Damn the noise ...I actually was watching this in 1am ...falling asleep...well, I am awake and scared hahaah
@sambaskw
@sambaskw 4 жыл бұрын
Super dear...
@veeramuthudotnetveera
@veeramuthudotnetveera 7 жыл бұрын
It s very useful for me.i am expecting more videos like this. Thank you
@aapkanigam
@aapkanigam 7 жыл бұрын
+veera muthu thanks . Please refer playlist. There are 37 videos on mvc
@numairazher1755
@numairazher1755 5 жыл бұрын
Thanks!... you helped me to solve an error!
@marcinedoza7507
@marcinedoza7507 4 жыл бұрын
Thank you very much Ashish, this really help me alot.
@aapkanigam
@aapkanigam 4 жыл бұрын
Thanks keep learning and sharing 🙏
@olabodebowoto1442
@olabodebowoto1442 6 жыл бұрын
Thanks a lot.very informative and precise training approach.
@aapkanigam
@aapkanigam 6 жыл бұрын
Thanks ..keep learning and sharing
@ilkerdoner
@ilkerdoner 5 жыл бұрын
sir really perfect Tutorials thank you for that u r really big king :)))
@Rajesh-rg6fw
@Rajesh-rg6fw 7 жыл бұрын
I saw a lot of videos but this is really nice. 100 out of 100. I have a request, please make the same page using MVC,Restfull web api and with the ajax call.
@josereynelchauxperez947
@josereynelchauxperez947 5 жыл бұрын
Excelente material, muchas gracias !!!
@Savariya91
@Savariya91 4 жыл бұрын
Perfect tutorial
@rodelcrisosto499
@rodelcrisosto499 2 жыл бұрын
6:51 This thing shocked the hell out of me. 🤣
@iftekharahmad4966
@iftekharahmad4966 7 жыл бұрын
ya it is very usefull for me...sir
@againstallodds611
@againstallodds611 7 жыл бұрын
thank you. It is very helpful.
@aapkanigam
@aapkanigam 7 жыл бұрын
+Againstallodds Thanks ..keep learning and sharing
@a1checkm8
@a1checkm8 6 жыл бұрын
Thank You, worked perfectly.
@a1checkm8
@a1checkm8 6 жыл бұрын
How would i insert multiple rows of data with a single submit button?
@excellins
@excellins 6 жыл бұрын
nice video. thanks for this
@danielnallapujoseph
@danielnallapujoseph 7 жыл бұрын
Thank you - Helped me a lot
@aapkanigam
@aapkanigam 7 жыл бұрын
+Daniel Nallapu if u find this useful then please share it ..
@navzme
@navzme 6 жыл бұрын
Thanks for awesome video
@TheTallyhoviper
@TheTallyhoviper 5 жыл бұрын
Hey Ashish, Thanks a lot for Good Tutorial, I'm Sory i have a little Problems, when i use try and catch code, its return me this Errors when i click submit. "System.Data.Entity.Validation.DbEntityValidationException: Validation failed for one or more entities. See 'EntityValidationErrors' property for more details. " Can you give me some advice for this erros, i've been searching for the solutions and those solution wasnt works for me.
@razvanboldor1758
@razvanboldor1758 4 жыл бұрын
Yeeeeeeahhh, veeeery goooood maaaan !
@canadaimmigrationlife
@canadaimmigrationlife 4 жыл бұрын
Hey did you find the solution ?
@ayoforyou448
@ayoforyou448 4 жыл бұрын
many thak's
@Pendyalakirit
@Pendyalakirit 4 жыл бұрын
Hey, Could you explain to me what is MVC Tutorial Entities in the controller?
@fkkk287
@fkkk287 4 жыл бұрын
yes, please...
@abhinavkumar8271
@abhinavkumar8271 7 жыл бұрын
Very good
@prayogamaturangga4494
@prayogamaturangga4494 4 жыл бұрын
Please silent that avast notif. it almost kill me at 3 AM By the way thanks, sooo useful
@mucahidakyar766
@mucahidakyar766 7 жыл бұрын
Thank you so much for your videos I have a question ,when i write part of "int latestEmpId = emp.EmployeeID;" i take error of dupplicate to primary key what should i do?
@timmarapao8005
@timmarapao8005 7 жыл бұрын
same problem
@betalaprasanth2420
@betalaprasanth2420 7 жыл бұрын
Don't write that code if you have declared as primary key and used Identity
@ruchimodi2214
@ruchimodi2214 7 жыл бұрын
thank you for the video tutorials.it is really great help I have doubt for the same employee_id. one time record is inserted but second time it shows error.What to do for the same.
@aapkanigam
@aapkanigam 7 жыл бұрын
+Ruchi Modi Make sure your employeeId should be set auto incremented while creating db table. part 26 will help you to create db table
@Ruhgtfo
@Ruhgtfo 5 жыл бұрын
Cool
@heshammhawach
@heshammhawach 4 жыл бұрын
When i go to my table definition it doesnt show the same class like yours it shows a partial class " public partial class ShippingDetails" is it okay to use it anyways?
@abdulmateen9037
@abdulmateen9037 5 жыл бұрын
wtf was that avast notification...scared the hell out of me
@yogeshsinghrawat5093
@yogeshsinghrawat5093 7 жыл бұрын
sir when i try to save my record its done only one time...coz the id become zero then after it was been error when i was enter another data..the exception name is=DbupdateException was unhandled by user
@aapkanigam
@aapkanigam 7 жыл бұрын
+yogesh rawat you cant update the autogenerated primary key ..make sure you are not updating id
@yogeshsinghrawat5093
@yogeshsinghrawat5093 7 жыл бұрын
sir it shows only like employeeId Name DepartmentId Address 0 rob 3 London iam trying to that id is the latest id ...bt it can't...
@EduardoHernandez-ux6gg
@EduardoHernandez-ux6gg 5 жыл бұрын
going two models insert?
@abdulmubeen5246
@abdulmubeen5246 6 жыл бұрын
hello sir, all are goes right.till maka a form. when i add @using(html.beginform("save","controller",formmethod.post()). it throws an error i.e: argument 3 cannot convert from anonymous type string class string placeholder to string.
@keanemgl
@keanemgl 7 жыл бұрын
Hi. When submit record i got this error Violation of PRIMARY KEY constraint 'PK_Employee'. Cannot insert duplicate key in object 'dbo.Employee'. The duplicate key value is (0).
@aapkanigam
@aapkanigam 7 жыл бұрын
+Ariunbat Ulambayar make your primary key column auto incremented. watch part 26 to create table and setting keys
@keanemgl
@keanemgl 7 жыл бұрын
i set id autoinc and reinserted employee edmx and it worked TY
@jimbroottanjimbru418
@jimbroottanjimbru418 7 жыл бұрын
Hey, could you please make a tutorial on creating a "Simple audio recorder and save it to database". Just need "Start and Stop" button. Thanks :)
@aapkanigam
@aapkanigam 7 жыл бұрын
+Jimbroottan Jimbru I have worked on creating audio record but I was using licenced script . I hope I would get thats free version and make tutorial on that
@jimbroottanjimbru418
@jimbroottanjimbru418 7 жыл бұрын
Thank you. When you finished. Please let me know
@kuldeepkumar-en1fk
@kuldeepkumar-en1fk 7 жыл бұрын
Sir, why you create employeeviewmodel class because i have already employee class
@aapkanigam
@aapkanigam 7 жыл бұрын
+kuldeep kumar coz employee class is volatile .. when you modify table schema then you have to update your model properties using EF. So its good to create viewmodel which will be dedicately used by view. Hence your view page will not be effected after updating model from entity framework
@saikiranmaddipatla
@saikiranmaddipatla 7 жыл бұрын
please post upload large video files into database and retriving in asp.net mvc
@wahajzafar6568
@wahajzafar6568 6 жыл бұрын
Hi Mr,Ashish i am facing a big problem in that actually i am working with 3 to 4 forms in single view cs.html file the form is present in modals (pop-up's) its giving me div element error what can i do?
@aapkanigam
@aapkanigam 6 жыл бұрын
Part 15 and 20 can help you
@shazzThing
@shazzThing 6 жыл бұрын
what is MVCTutorialEntities in the project i cant understand?? please reply fast i am waiting for your answer.
@isaacige
@isaacige 5 жыл бұрын
That's the name of the Entity relationship framework
@bhaskarkholiya8125
@bhaskarkholiya8125 6 жыл бұрын
hii, ashish sir why i am getting EmployeeID as 0, as my Employee table is already having 5 records, record is insert as first row in table
@aapkanigam
@aapkanigam 6 жыл бұрын
+Bhaskar Kholiya please check its datatype. Is it int?
@bhaskarkholiya8125
@bhaskarkholiya8125 6 жыл бұрын
yes,
@bhaskarkholiya8125
@bhaskarkholiya8125 6 жыл бұрын
yes, also i made my primary key as identity now code is not inserting values for identity column
@aliridhohabsyi1242
@aliridhohabsyi1242 7 жыл бұрын
Hi Ashish i got a problem with insert data cause that's Cannot insert explicit value for identity column in table 'Employee' when IDENTITY_INSERT is set to OFF. i have already set of the EmployeeID to auto increment with set "yes" the identity specification on sql server. Please help what should i do ??
@aapkanigam
@aapkanigam 7 жыл бұрын
+Ali Ridho Habsyi part 26 might help you to create table with primary key and setting autoincrement, and foreign key
@muhammadazeem7395
@muhammadazeem7395 7 жыл бұрын
I just want to ask, what is Employees in this db.Empolyees.Add.(emp); ??
@bhaskarkholiya8125
@bhaskarkholiya8125 6 жыл бұрын
hii, ashish sir why i am getting EmployeeID as 0, as my Employee table is already having 5 records, record is insert as first row in table , also i made my primary key as identity now code is not inserting values for identity column
@wymowaiyan6505
@wymowaiyan6505 4 жыл бұрын
Did you specify identity specification = true?
@trr5088
@trr5088 8 жыл бұрын
How can I update the previous MVCTutorial database to the one used in Lesson 11. I have tried running the scrip with the provided code but always say that information is already present. When trying to build this project I get an error involving a foreign key, so I must be doing something wrong on this. Can anyone offer suggestions?
@aapkanigam
@aapkanigam 8 жыл бұрын
please first drop your database then run the script.Also you need to refresh you entity framework .
@raihan8935
@raihan8935 5 жыл бұрын
while i click on submit button it's inserting data at the top of my database, why is this happening. please comment for help because i can enter only one data shows exception while inserting another.
@aapkanigam
@aapkanigam 5 жыл бұрын
make sure your table id is set to auto increament.
@mohitjoshi7587
@mohitjoshi7587 4 жыл бұрын
I have done the code same as told by you but I m getting an exception of EntityValidationException. Kindly provide solution to solve this exception.
@mohitjoshi7587
@mohitjoshi7587 4 жыл бұрын
Kindly reply ASAP because I need solution on urgent basis
@babugenerous9034
@babugenerous9034 7 жыл бұрын
how pass array of data to controller from form i.e one transsection have many product like this. how i do it ??
@adeelclever98
@adeelclever98 6 жыл бұрын
I am getting an exception at throw statement "System.Data.Entity.Validation.DbEntityValidationException: Validation failed for one or more entities. See 'EntityValidationErrors' property for more details. "
@4030yes
@4030yes 5 жыл бұрын
me too, do you found the solution?
@shiyin5413
@shiyin5413 6 жыл бұрын
Hi there, i follow your steps, but my record doesnt save... i cannot find the error please help me
@shiyin5413
@shiyin5413 6 жыл бұрын
when i hover to the model, i cannot get the parameter like you do... what is the problem
@aapkanigam
@aapkanigam 6 жыл бұрын
+shi yin did you try the code available on blog?you can get the code link from video description. That might help you
@shiyin5413
@shiyin5413 6 жыл бұрын
I didn't use the database exactly like yours..i got mine...but all the steps are all the same..just the data is not the same..is there anyway to track the error?
@shiyin5413
@shiyin5413 6 жыл бұрын
i still having the same problem...entity framework just not saving without error
@aapkanigam
@aapkanigam 6 жыл бұрын
+shi yin are u able to debug code
@akifstagram6831
@akifstagram6831 3 жыл бұрын
Guys, Can someone explain why do we make it equal "latestEmpId" to "emp.EmployeeId" ?
@Hawkingxx
@Hawkingxx 6 жыл бұрын
MVCTutorialEntities WHAT IS?
@aapkanigam
@aapkanigam 6 жыл бұрын
Checkout you connection string name and create the object with same name. It's the name of the class that consists db sets for each entity
@Hawkingxx
@Hawkingxx 6 жыл бұрын
+Technotips - Ashish I thought that was it and finally I adapted it to my own code but not in the same way. thanks you, i progress so much in my programm. i have question ¿Is not it necesary to use query for insert?
@aapkanigam
@aapkanigam 6 жыл бұрын
Yes , entity framework has different way to insert data .. you need to use only entity queries to insert update delete etc
@Swayybot
@Swayybot 4 жыл бұрын
AVAST VIRUS DATABSE HAS BEEN UPDATED
@Triveni-01
@Triveni-01 5 жыл бұрын
how to insert data using asp.net mvc without using entity framework and it has to store in database please help me anyone,,,,,for
@aapkanigam
@aapkanigam 4 жыл бұрын
Using ado .net you can save the data.
@doratoadriano
@doratoadriano 5 жыл бұрын
How many "OK" you have said!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@namnguyenvan1711
@namnguyenvan1711 3 жыл бұрын
the sound is not good I am quite disappointed
@false4207
@false4207 2 жыл бұрын
Wtf with the anti virus stuff. Come on man!!! Lame
Part 13- Insert data into MULTIPLE TABLES in an ASP.NET MVC application
10:57
99.9% IMPOSSIBLE
00:24
STORROR
Рет қаралды 31 МЛН
Support each other🤝
00:31
ISSEI / いっせい
Рет қаралды 81 МЛН
Beat Ronaldo, Win $1,000,000
22:45
MrBeast
Рет қаралды 158 МЛН
Part 7- Working With Multiple Tables in ASP.NET MVC (Model-View-Controller)
12:49
Part 12- Server Side and Client Side Validation in ASP.NET MVC
17:30
Technotips Ashish
Рет қаралды 63 М.
Part 4- MODEL Binding in ASP.NET MVC (Model-View-Controller)
13:23
Technotips Ashish
Рет қаралды 77 М.
99.9% IMPOSSIBLE
00:24
STORROR
Рет қаралды 31 МЛН