Entity Framework - Insert Update and Delete in C#

Поділитися
Вставка
  • Опубліковано 27 сер 2024

КОМЕНТАРІ • 179

  • @CodAffection
    @CodAffection  6 років тому

    goo.gl/RFY5C2 : Subscribe to CodAffection
    goo.gl/SUi4bg : Login Window in C# Using SQL Server
    goo.gl/zV892S : C# CRUD Operations With SQL Server
    goo.gl/bPcyXW : Buy me a Coffee

    • @khushbujoshi7356
      @khushbujoshi7356 4 роки тому

      your skill talents shows everything...your speech is too good.don't think too much on that.keep it up.👍👍👍

  • @Brianseb
    @Brianseb 2 роки тому +1

    Gracias Maestro, 5 años tiene el video y sos el único que en todo internet que sabe enseñar como hacer un Update en Entity.

  • @valeriusmegamozg
    @valeriusmegamozg 5 років тому +12

    It's a very helpful video! Thank you very much, you've just closed all points in 30 minutes much better than my lecturer in 1 week. Thank you!

    • @CodAffection
      @CodAffection  5 років тому +2

      thanks for the wonderful feedback!.

  • @samsamry9179
    @samsamry9179 3 роки тому +3

    Superb one,
    Really worked very well and made easier
    I'm looking forward to seeing search btton function additionally

  • @shifasvn3256
    @shifasvn3256 2 роки тому

    you helped me to begin my learning of winforms and i have learned it in one day.i have 2 years experience in .net core and entity framework.this helped me to posses knowledge about winforms ,it was necessary for me because the new company which i got a new offer needed winforms.

  • @TIAGO543211
    @TIAGO543211 4 роки тому

    this channel is the better one, im not even a fluent english speaker but i understand better than people teaching from my own country, i really appreciate your channel bro!!

    • @CodAffection
      @CodAffection  4 роки тому +1

      thanks for your wonderful feedback.

  • @tohidulislam5041
    @tohidulislam5041 2 роки тому

    I use C# winform for 7 years and used parameterized query and never tried EF of fear of learning. After seeing this video all fears gone and feel interested on it. From now for my new project I will try to use EF.

  • @bejanniku
    @bejanniku 5 років тому

    Dude, your English is perfect. But that TABL instead of table really cracks me up! good work tho

  • @khizerhussain8313
    @khizerhussain8313 2 роки тому +1

    Very Helpful Video! Thank You

  • @PalashBansal
    @PalashBansal 4 роки тому +1

    very concise and to the point. Thanks :)

  • @KhalidAfridi1
    @KhalidAfridi1 2 роки тому

    Thumbs Up bro. Excellent explanation of CRUD operation of using Entity Framework. You saved a lot of my time. Thanks

  • @INDIANSinghX
    @INDIANSinghX 3 роки тому

    Dude u did great job ,thanks a lot dear

  • @2005Azm
    @2005Azm 6 років тому +1

    Such a elegance in your code sir ! Clean , and clear, complexity made simple !

  • @alikemalkulful
    @alikemalkulful 2 роки тому

    Perfect explanation. Very clear, Thanks a lot

  • @user-pw9mp6uk1t
    @user-pw9mp6uk1t 2 місяці тому +1

    Thank You.

  • @waqarahmadqureshi6948
    @waqarahmadqureshi6948 3 роки тому +1

    thankyou... its helpful

  • @ga7853
    @ga7853 5 років тому +3

    Thank you so much, that was so clear and understood, I appreciate your efforts for making this great video, Thanks again

  • @atakantekoglu5520
    @atakantekoglu5520 4 роки тому

    Thank you very much. It is so educational for me. You are a very brilliant instructor. Keep going!

    • @CodAffection
      @CodAffection  4 роки тому +1

      Thanks for your wonderful feedback. let me know your topic suggestion for future tutorials.

    • @atakantekoglu5520
      @atakantekoglu5520 4 роки тому

      @@CodAffection Nowadays, I try to learn .Net MVC. Maybe, you can focus on it and also, it is better to create full blog project or etc. with MVC. Thank you.

  • @KL-gc2hx
    @KL-gc2hx 3 роки тому

    Thank you very much! Learn a lot from your video!

  • @alirezakazemi5318
    @alirezakazemi5318 4 роки тому

    This was very easy to follow and practical. Thanks so much!

  • @hazelannmacaraig8155
    @hazelannmacaraig8155 3 роки тому +3

    Hi sir .Thank you for this tutorial. I would like to ask how if one of the columns in database was integer not string . is it possible to run without any convertion? if not can how can i insert data to the sql that have different data types? Hope to hear from you soon. Thanks in advance

  • @user-gu3kj6gy8q
    @user-gu3kj6gy8q 5 років тому +1

    Oh man! Thank you very much for this tutorial. Sorry of my english. I'm from Russia)

  • @mjkl614
    @mjkl614 6 років тому

    I can hear chicken clucking in the background, you must woke up real early and made these videos, great job, keep up the good work!

  • @nsh8255004
    @nsh8255004 4 роки тому

    it was super perfect tutorial. waiting more from you. thanks alot.

  • @christosioannou7359
    @christosioannou7359 4 роки тому

    Best video ever seriously!!!
    THank you very much

  • @mustaphaELHOURA
    @mustaphaELHOURA Рік тому

    very helpful thank you so much

  • @mikolajsemeniuk8574
    @mikolajsemeniuk8574 3 роки тому

    Very helpful !

  • @pocomomo310
    @pocomomo310 3 роки тому

    It was so helpful!! Thank you very much. Much appreciated.

  • @kavindutharaka2273
    @kavindutharaka2273 5 років тому +1

    very clear explanation. Thank you very much.

  • @skillshared3249
    @skillshared3249 3 роки тому

    Thank you so much. This is great tutorial.

  • @cholemoore5733
    @cholemoore5733 6 років тому

    Thanks. Great video! Well explained. Only wish that I found this video earlier for my assignment.

    • @CodAffection
      @CodAffection  6 років тому

      glad you found the video helpful.

  • @manojrathore85
    @manojrathore85 2 роки тому

    Excellent video

  • @stevenyaga
    @stevenyaga 4 роки тому

    Very very helpful video

  • @tusharkantidas4622
    @tusharkantidas4622 4 роки тому

    Awesome job sir...

  • @PabloPellegrini
    @PabloPellegrini 5 років тому

    Perfect explication!! Thank you from Argentina! ♥

    • @CodAffection
      @CodAffection  5 років тому

      glad you found the video helpful.

  • @traderasapassion7760
    @traderasapassion7760 3 роки тому

    It's really helpful

  • @tjensen529
    @tjensen529 5 років тому

    Excellent video. Thanks much!

  • @just_kidding_kid
    @just_kidding_kid Рік тому

    Thanks
    Helped
    Regards from Ukraine

  • @abadd0n297
    @abadd0n297 4 роки тому

    Who's the man? You're the man! :D

  • @theethicalh3707
    @theethicalh3707 4 роки тому

    thank you very much bro

  • @osempo
    @osempo 5 років тому

    Cool video, easy to follow.

  • @edvardpotapenko
    @edvardpotapenko 5 років тому

    Thank you very much, that was very helpful!

  • @mscamarade3413
    @mscamarade3413 4 роки тому

    Thanks, very mach! Very useful video

  • @rafaelramos8220
    @rafaelramos8220 5 років тому

    That was a good video, I'm coming back to code world and it helped me a lot.

  • @fabiofocking382
    @fabiofocking382 5 років тому

    Wonderfull, this video save my projetc! thank you for this tutorial.

    • @CodAffection
      @CodAffection  5 років тому

      thanks for sharing your comment.

  • @UBOINIK_TanksBlitz
    @UBOINIK_TanksBlitz 3 роки тому

    Большое спасибо! Ваше видео очень помогло мне!

  • @kumaresha3348
    @kumaresha3348 4 роки тому

    Great video Brother. Please create video using MySQL for the same Entity. It is very interesting to learn C# Windows Application.

  • @ThumbIKR
    @ThumbIKR 6 років тому +1

    Owwww, really great tutorial sir, thanks :)

  • @mrgonzolla
    @mrgonzolla 5 років тому

    Thank you for this video. I found it very helpful!

    • @CodAffection
      @CodAffection  5 років тому

      glad you found the video description.

  • @2005Azm
    @2005Azm 6 років тому +2

    Great tutorial as always !! sir can please make an example with more than on table ? like a relational database..?

  • @robertmcdonough1084
    @robertmcdonough1084 5 років тому

    Awesome video! This helped me so much

  • @amirhamzasabuz7977
    @amirhamzasabuz7977 4 роки тому

    Thank you

  • @sanianaqvi4987
    @sanianaqvi4987 3 роки тому

    Thanks a lot

  • @TheThinker-ug3wr
    @TheThinker-ug3wr 5 років тому +1

    great tutorial and its worked
    good

    • @nvidiapersy
      @nvidiapersy 5 років тому

      what visual studio did you use ?

  • @johnsimbe991
    @johnsimbe991 6 років тому

    Helpful video, thank u sir!

  • @Gus-px7hd
    @Gus-px7hd 6 років тому

    Very useful, Thank you.

  • @jeffsonic
    @jeffsonic 3 роки тому

    great job

  • @akramtester5249
    @akramtester5249 5 років тому

    Hi mr. I viewed your video twice, actually very nice, when you using new way to make connection in page load. actually I always use sqldatasource tool to make connection and get data to another toll(gride view ot ditails view), am trying to mix your method with mine,..thanks

  • @whopawan8384
    @whopawan8384 4 роки тому

    Thanks, Man very helpful

  • @ga7853
    @ga7853 5 років тому

    Thank you so much for this wonderful efforts, and thank you again for the source code, you have made easy for us. Grateful.

  • @jaberramadandabash2973
    @jaberramadandabash2973 5 років тому +2

    waiting for printing reports operation :D

  • @blazept567
    @blazept567 6 років тому

    Thank you very much, Sir!

  • @ronaldkiefer3565
    @ronaldkiefer3565 5 років тому

    Boom Thanks video tutorial was very helpful so far

    • @CodAffection
      @CodAffection  5 років тому

      glad you found the video helpful.

  • @elegeblege1618
    @elegeblege1618 5 років тому +1

    That rooster in the background is killing me 29:41
    However, thank you so much for tutorial !!

    • @denzoV2
      @denzoV2 5 років тому

      you dead or alive?

  •  5 років тому

    thanks very much Ad

  • @arslanjappa4335
    @arslanjappa4335 6 років тому +2

    sir you always just made crud operaition on text boxes.ur videos will get more appericiation if you include picture,radioboxes combobox and time in crud.bcz i have nt seen such kind of crud operation on youtube.

    • @CodAffection
      @CodAffection  6 років тому

      thanks for the suggestion, that's coming up next week.

  • @papamagueye6090
    @papamagueye6090 5 років тому

    It is so clear... nice job

  • @humayunnasir6261
    @humayunnasir6261 5 років тому

    VERY GOOD VIDEO THANKS ALOT

  • @NguyenLuan-xn4ym
    @NguyenLuan-xn4ym 4 роки тому

    So Useful, Thank to u 😃

  • @phattainguyen7545
    @phattainguyen7545 3 роки тому

    Thanks for video. Do i can use db.Entry(model).State = System.Data.Entity.EntityState.Deleted; and saveChanges() to delete without using Detached and Attach(model) ? Thank you for reading.

  • @NavaneethaKrishnanA
    @NavaneethaKrishnanA 4 роки тому

    Thank you.

  • @hajerjalloul7311
    @hajerjalloul7311 6 років тому +2

    good !! it's helpful

  • @talithasouza1298
    @talithasouza1298 3 роки тому

    simples e muito bom, ajuda muito

  • @zerosandones7547
    @zerosandones7547 4 роки тому

    Can you do something like this but it has a one-to-many relationship? you teach so well! liked and subbed :D

  • @learncodego1724
    @learncodego1724 Рік тому

    big like for you

  • @nelpro
    @nelpro 5 років тому

    Bro, you're the best!

  • @mballo3516
    @mballo3516 4 роки тому

    wonderfull ! Thank you very much !

    • @CodAffection
      @CodAffection  4 роки тому +1

      thank you, let me know if you have any topic suggestion for future videos.

  • @bishangiri677
    @bishangiri677 2 роки тому +1

    Guru is it possible to sync sql database to web server in c sharp desktop app

  • @waseembaltistani
    @waseembaltistani 6 років тому

    If you would added "Search" function also then it will be definitely helpful for the viewers.

  • @odehanas
    @odehanas 3 роки тому

    Thanks for the video .. it's very helpful i followed and every thing is fine but in the delete function i have got this message if possible to help solving it.. "The entity type Boolean is not part of the model for the current context.'"
    thanks again ..

  • @Trakai2009
    @Trakai2009 5 років тому

    Great video! But how to sort on, for example by Lastname, by code?

  • @skillshared3249
    @skillshared3249 3 роки тому

    What do you fetch the entity from the database for edit ? You can get it from the grid itself.

  • @mazkaibil9108
    @mazkaibil9108 6 років тому

    Hello, very good tutorial. Is there any video showing how to do this application with two related tables? please advise.

  • @sathishchowdary8346
    @sathishchowdary8346 6 років тому

    Its so helpful. Can you develop a sample library application using ASP.NET MVC with different books count and the count should be reduced if any one borrows book. If you do that , It will be great.

  • @militoelynea
    @militoelynea 6 років тому +1

    I LOVE YOU!

  • @BahawalTV
    @BahawalTV 4 роки тому

    Why can't you bind the entity directly to the form controls?

  • @AaBb-nn9pl
    @AaBb-nn9pl 3 роки тому

    it is a pity that it is not in Russian, thank you man, I am from Russia

  • @orthodoxx366
    @orthodoxx366 Рік тому

    mantap gaan

  • @anjumanbaqeriaghowari5373
    @anjumanbaqeriaghowari5373 6 років тому

    thanku so much sir

    • @CodAffection
      @CodAffection  6 років тому

      Glad you found the video helpful.

  • @muhammadafzal237
    @muhammadafzal237 2 роки тому

    How to calculate sum of a column values?

  • @johnpaolodelrosario6792
    @johnpaolodelrosario6792 6 років тому

    would like to ask why the state of var entry become detached?

  • @altaymahmudi6385
    @altaymahmudi6385 4 роки тому

    can you tell me how we can use Trim with datetimepicker? i am getting error and it is really annoying

  • @danilobastos6182
    @danilobastos6182 5 років тому

    I have a problema when I do a double-click to update the row. Appears a message saying that don't find the column with the name 'CustomerID', but the column name is correct. Somebody passed through for the same thing?

  • @heinoplaatjies5334
    @heinoplaatjies5334 5 років тому +1

    That was a great clean example, i have tried to do a similar exercise but with an extra field, called section, i used data binding to bind the combobox to a table called sectionTable, when you click on the combobox it dropsdown with a list of all the sections, which is displaying the "Display members", and the "value member" = sect_id. but trying to add a new user to the users table, it gives me an Entity Framwork validation error. System.Data.Entity.Validation.DbEntityValidationException: Validation failed for one or more entites
    here is my code:
    private void btn_AddUser_Click(object sender, EventArgs e)
    {
    users.Name = txt_userName.Text.Trim();
    users.Surname = txt_userSurname.Text;
    users.Email = txt_userEmail.Text;
    users.CellNo = Convert.ToInt32(txt_userCell.Text);
    users.OfficeNo = Convert.ToInt32(txt_userOffice.Text);
    users.LicNo = Convert.ToString(txt_userLicNo.Text);
    users.ID_No = Convert.ToInt32(txt_userID.Text);
    users.Role_id = cbox_RoleName.SelectedIndex;
    users.Sect_id = cbox_SectionName.SelectedIndex;
    users.Username = txt_userUsername.Text;
    users.Password = BCrypt.Net.BCrypt.HashString(txt_userPassword.Text);
    using (BookingVEHEF ef = new BookingVEHEF())
    {
    ef.Users.Add(users);
    ef.SaveChanges();

    };

  • @sohailaslam8090
    @sohailaslam8090 6 років тому

    Hi thanks for these tutorials can you post a tutorial on asp.net identity . thanks

    • @CodAffection
      @CodAffection  6 років тому

      it's already there but using web api and angular 5.
      user registration : ua-cam.com/video/h85_GT62K6A/v-deo.html
      login and logout : ua-cam.com/video/e8BlURn6SFk/v-deo.html
      role based authorization : ua-cam.com/video/Ks5ADKqPrBQ/v-deo.html

  • @qurbansaberi479
    @qurbansaberi479 6 років тому

    Hi bro
    Can make video about how to insert picture into database how update and how to convert jpg file into bytes

  • @Roshan_Panwar
    @Roshan_Panwar 4 роки тому

    It's showing Error
    Configuration Exception Un handled
    The entry dbentities have already been added

    • @mstemper7345
      @mstemper7345 4 роки тому

      Did you fix yours? Mee too same problem

    • @Roshan_Panwar
      @Roshan_Panwar 4 роки тому

      I removed the DB model and used some other way but used the same design... I'll give you link wait..

    • @Roshan_Panwar
      @Roshan_Panwar 4 роки тому

      @@mstemper7345 ua-cam.com/video/TIAOr2S6-SY/v-deo.html

    • @Roshan_Panwar
      @Roshan_Panwar 4 роки тому

      This will help

    • @mstemper7345
      @mstemper7345 4 роки тому

      @@Roshan_Panwar THANK YOU!!!!

  • @Babaelow
    @Babaelow 3 роки тому

    19:30 how the refresh of the view is done

  • @shashanktiwari8180
    @shashanktiwari8180 4 роки тому

    Void PopulateDataGridView()
    {
    using (DBEntities db = New DBEntities ())
    {dgvCustomer.DataSource = db.Customers.ToList();
    }
    }
    Error on( dgvCustomer )
    Error is The name is 'dgvCustomer' does not exist in the current context .
    Please help

  • @tanakakambasha4160
    @tanakakambasha4160 3 роки тому

    That save button will save blank records