Implementing post method in ASP NET Web API

Поделиться
HTML-код
  • Опубликовано: 11 дек 2024

Комментарии • 99

  • @Epyon1234
    @Epyon1234 7 лет назад +15

    This video saved me! Thank you!

    • @Csharp-video-tutorialsBlogspot
      @Csharp-video-tutorialsBlogspot  7 лет назад +7

      Thank you very much for taking time to give feedback. This means a lot. I am very glad you found the videos useful.
      I have organised all the Dot Net & SQL Server videos in to playlists, which could be useful to you
      ruclips.net/user/kudvenkatplaylists?view=1&sort=dd
      If you need DVDs or to download all the videos for offline viewing please visit
      www.pragimtech.com/kudvenkat_dvd.aspx
      Slides and Text Version of the videos can be found on my blog
      csharp-video-tutorials.blogspot.com
      Tips to effectively use my youtube channel.
      ruclips.net/video/y780MwhY70s/видео.html
      If you want to receive email alerts, when new videos are uploaded, please subscribe to my youtube channel.
      ruclips.net/user/kudvenkat
      If you like these videos, please click on the THUMBS UP button below the video.
      May I ask you for a favor. I want these tutorials to be helpful for as many people as possible. Please share the link with your friends and family who you think would also benefit from them.
      Good Luck
      Venkat

    • @spencercasen5037
      @spencercasen5037 3 года назад

      I realize I'm quite randomly asking but does anyone know of a good site to watch new series online?

    • @duncanarcher2626
      @duncanarcher2626 3 года назад

      @Spencer Casen i use flixzone. You can find it by googling =)

    • @ryderahmir6820
      @ryderahmir6820 3 года назад

      @Duncan Archer Yea, I've been watching on FlixZone for months myself :D

    • @spencercasen5037
      @spencercasen5037 3 года назад

      @Duncan Archer thanks, I signed up and it seems to work =) I really appreciate it !

  • @RaJaiswal_RJ
    @RaJaiswal_RJ 6 лет назад +9

    some time i don't understand why some other unnecessary videos like jokes etc make 10 20 50M views while after very hard work this kind of post does not make even 0.5M views. Always awesome job done by venkat sir.

    • @benumadhab
      @benumadhab 3 года назад +4

      thats the diff between entertainment and education, :)

  • @RaviGupta210
    @RaviGupta210 7 лет назад +2

    I saw Video again and now I got it. We're passing entity to return. Thanks a lot for creating such demos which makes understanding so easy.

  • @AlokSingh-vh8bl
    @AlokSingh-vh8bl 4 года назад +1

    you are like a blessing to all the IT employees

  • @tmcode2010
    @tmcode2010 3 года назад

    just found your channel.
    I really love it!

  • @arthisr8420
    @arthisr8420 6 лет назад +4

    Sir,am getting error(HTTP/1.1 502 Fiddler - Connection Failed) while calling post method.
    Could you please help me to fix the issue?

  • @itspreethisworld848
    @itspreethisworld848 7 лет назад

    its really good about how you modify the code and evolve it to more appropriate and perfected code

  • @leonardacquaye1978
    @leonardacquaye1978 7 лет назад +1

    Thank you for the tutorials. I've found each one to be very informative. I was hoping you could post something to help resolve an error I'm receiving when trying to update the Get method to return the correct error code. Specifically, I'm getting the following: "Cannot implicitly convert type 'System.Net.Http.ResponseMessage to [DataAccess.MyModel]". Thanks again! Your videos have helped me tremendously.

  • @RaviGupta210
    @RaviGupta210 7 лет назад +1

    Thank you for your posts. Appreciate it.
    I have a doubt in Get Verb with ID.
    The final mentioned return type is HTTPResponseMessage and thus we are able to return correct header response, but then how are we getting the employee details even when return type is changed. Please tell us the concept behind it.
    Thanks.

  • @dhiraj027in
    @dhiraj027in 4 года назад

    Great video. Today I properly understood how this works in terms of C#. Can you help me understand what happens when you send the same request for the existing user?
    Or
    If you send an update to the salary of the user?

  • @KhurramShahzad-qg1dh
    @KhurramShahzad-qg1dh 2 года назад

    your the best teacher

  • @aniruddhabasak7441
    @aniruddhabasak7441 4 года назад

    Very good video. I have learnt a lot. Thank you sir..

  • @terjes64
    @terjes64 5 лет назад

    You don't need to have [frombody] in posts, only if you send simple types(string, int) and not objects. Will kudvenkat make a followup course for webapi 2? It has some nice shortcuts like return BadRequest();

  • @karub34
    @karub34 8 лет назад +1

    Thank you venkat, nice course.

  • @manishjadhav2688
    @manishjadhav2688 7 лет назад

    Thank you for all tutorials..
    sir what I have to do if I want to POST data for one-to-many relationship.

  • @snehakothawade4353
    @snehakothawade4353 7 лет назад

    hello sir, thanks for all the tutorials. I want to post data into table but I have two foreign keys in the table in which I want to insert data. I tried a lot but but not able to solve yet. how to solve this issue?

  • @muhammadrehbarsheikh8498
    @muhammadrehbarsheikh8498 8 лет назад

    Thank you venkat sir. god bless you!

  • @hshlom
    @hshlom 6 лет назад

    Awesome! Much better than PlualSight!

  • @kavithavishwanathen6778
    @kavithavishwanathen6778 6 лет назад

    Again great explanation..Thank you so much sir...

  • @jitendermandhaniya411
    @jitendermandhaniya411 5 лет назад +1

    ExceptionMessage=No MediaTypeFormatter is available to read an object of type 'Employee' from content with media type 'appliction/json'. sir please help me

  • @vikassingla6590
    @vikassingla6590 7 лет назад

    Thanks for this video sir , I have one doubt that why did you use "Var" datatype instead of "Employee" datatype in following code line of get method:-
    var entity = entities.Employees.FirstOrDefault(e => e.ID == id);

  • @norcedesign7233
    @norcedesign7233 8 лет назад

    Congratulation Your tutorial are very good. How can I get the last Id if I am using stored procedure for inserting?

  • @pitchaipillai519
    @pitchaipillai519 7 лет назад

    hi sir, is it possible to add multiple post in single controller?

  • @adityapathak9999
    @adityapathak9999 6 лет назад

    How we can do the same with Created method. Or we can not do this with Created message as you said that response message is for webapi1 and OK and Created for Web API 2

  • @davidemarzorati2568
    @davidemarzorati2568 6 лет назад

    You are great!!! Thanks for your beautiful tutorials!!!

  • @SamuelRamirez-pk5sg
    @SamuelRamirez-pk5sg 7 лет назад

    What about if I have some class variables optionals? It send an error in Datetime type

  • @aryalfianto
    @aryalfianto 3 года назад

    hi kudvenkat , ihave Response Header like this "HTTP/1.1 400 Bad Request", are you have solution for this ?

  • @priyankatripathi562
    @priyankatripathi562 7 лет назад

    how the value is inserted in database.We are not inserting data through UI .Can you please let me know from where we are inserting this data ?

  • @kanhamunjal759
    @kanhamunjal759 3 года назад

    Thank you for the wonderful series. Can you please upload some videos .NET Core 5 (.NET 5) and .NET Core Web API? Appreciate your content.

  • @thelostcanyons
    @thelostcanyons 4 года назад

    that was useful....Thank you...

  • @vishalmakam7291
    @vishalmakam7291 6 лет назад

    I m getting error of identity (An exception of type 'System.Data.Entity.Infrastructure.DbUpdateException' occurred in EntityFramework.dll but was not handled in user code) and in ID everytime execute post method its getting Zero ("0") value only

  • @YasaaGaming
    @YasaaGaming Год назад

    how to check web api without run (I saw you doing only build solution after edit. but in my case i cant check changes without running on google chrome. when i run the code clicking Google Chrome Debugging Button, I cant Edit Code Without Stop Debugging) please tell me how do you Doing This?)
    Thank You

  • @Nicetrycutiepie
    @Nicetrycutiepie 3 года назад

    Thanks so much for this.

  • @intcoder
    @intcoder 6 лет назад

    Awesome Explanation!

  • @Shubham16ify
    @Shubham16ify 4 года назад

    Sorry, If it is a stupid question But want to understand that initially we didnt pass employee with ID in the POST request, Then how are we getting ID in the object which is referred in
    var message = Request.CreateResponse(HttpStatusCode.Created, employee);

  • @jve1999
    @jve1999 Год назад

    Good job. Thanks

  • @sivaboyidi9939
    @sivaboyidi9939 7 лет назад

    At this line (Request.CreateResponse(HttpStatusCode.Created, objmvcWithEFAndAPI);)
    I'm getting this error.
    'System.Web.HttpRequestBase' does not contain a definition for 'CreateResponse' and the best extension method overload 'System.Net.Http.HttpRequestMessageExtensions.CreateResponse(System.Net.Http.HttpRequestMessage, System.Net.HttpStatusCode, T)' has some invalid arguments.
    Please help me out........ Thanks in advance.

  • @cpManikanta
    @cpManikanta 7 лет назад

    sir please explain webapi with javascript and odata for mscrmwith some real time scenarios. please explain step by step

  • @naodagere8210
    @naodagere8210 4 года назад

    Thank you. Great as usual!

  • @nehagarg9091
    @nehagarg9091 3 года назад

    Can you please help with post method to post list of JSON objects at a time in ASP NET Web API?

  • @usmanmirza5723
    @usmanmirza5723 7 лет назад +2

    Hi, this is very nice tutorial however i have a little problem i try to find out but all in vain..whenever i make post request after updating post message every time response returns location "Location: localhost:51973/api/Employees11" i dont know why..with id at the end its not giving slash even i make same copy of ur code as shown in video.. Thanks in advance

    • @jacksonjohn9769
      @jacksonjohn9769 7 лет назад

      Yea right I too got in same format.

    • @CompSciMechanic
      @CompSciMechanic 7 лет назад +1

      I got same but realized in his fiddler he includes the ending '/' in the post, I am betting that you (me) omitted thhe trailing '/' when sending the fiddler employee post. The question I have is how do we easily fix this case do we check for last location char and append '/' if not present or is there a built in way to format it the same always

    • @jacksonjohn9769
      @jacksonjohn9769 7 лет назад

      Go to part 33-Generating links using route names in asp
      you will understand the logic behind this.

  • @hamzaa545
    @hamzaa545 5 лет назад

    thank you Venkat

  • @sankethdhegde1471
    @sankethdhegde1471 5 лет назад

    Thanks for teaching. Where do we get the source code?

    • @Csharp-video-tutorialsBlogspot
      @Csharp-video-tutorialsBlogspot  5 лет назад

      Hello Sanketh - You can find the source code in text format on my blog at the following link. You can copy and paste it instead of typing everything by hand. Hope this helps.
      csharp-video-tutorials.blogspot.com/2016/09/aspnet-web-api-tutorial-for-beginners.html

  • @nammozhi819
    @nammozhi819 2 года назад

    Good one

  • @akiavi0812
    @akiavi0812 5 лет назад

    Hi Sir I am getting null in FromBody please give me the solution..I tried Content-Type:application/json

  • @priyankatripathi562
    @priyankatripathi562 7 лет назад

    I am confused to get the ans. please respond to clarify the logic.

  • @peterl1699
    @peterl1699 8 лет назад

    always great tutorial.but how do u upen the response in the browser. i always get a file to download.

    • @neeharathnajanjanam86
      @neeharathnajanjanam86 6 лет назад

      Hope this link helps u out:)
      www.codeproject.com/Tips/216175/View-JSON-in-Internet-Explorer

  • @azharbangi5633
    @azharbangi5633 7 лет назад

    HTTP/1.1 502 Fiddler - Connection Failed it is giving this error in post method

  • @umerwaqas5943
    @umerwaqas5943 4 года назад

    Hi Sir, i want to send image file with form data, how can i please?
    any one help me.

  • @jyothigoud5052
    @jyothigoud5052 7 лет назад

    I created the webapi with your code, but Get method with parameter doesn't execute. when i run localhost:53686/api/employees/1 here is the error that i get
    {"Message":"No HTTP resource was found that matches the request URI 'localhost:53686/api/employees/1'.","MessageDetail":"No action was found on the controller 'Employees' that matches the name '1'."}

  • @KamrulIslam-wj1ky
    @KamrulIslam-wj1ky 5 лет назад

    How do i post a nested JSON by post method?

  • @rishiroy8789
    @rishiroy8789 4 года назад

    How do I POST to multiple Tables that are related by foreign key ?

  • @oiei2767
    @oiei2767 5 лет назад

    big THX for you video!

  • @Saraguaful
    @Saraguaful 3 года назад

    Thank you, but, how can I implement it in an App?

  • @tigerwuli2760
    @tigerwuli2760 5 лет назад

    I excute the POST method and the new Employee goes to the top of the Employees table with ID = 0. Why? Anybody pls

  • @devsuraj
    @devsuraj 6 лет назад

    I am getting null in form body

  • @satyapriyanka7001
    @satyapriyanka7001 19 дней назад

    who is watching it in nov 2024

  • @imranbutt4556
    @imranbutt4556 8 лет назад

    sir Jee tusi great ho :)

  • @haroonraheed1688
    @haroonraheed1688 7 лет назад +1

    This is gold

  • @momen153
    @momen153 3 года назад

    awesome

  • @jayashreereddy5643
    @jayashreereddy5643 8 лет назад

    Excellent

  • @tulikaagrawal1713
    @tulikaagrawal1713 8 лет назад

    my post method is not accepting any parameter from fiddler. showing null

    • @Epyon1234
      @Epyon1234 7 лет назад

      tulika agrawal do you have your object set up correctly in visual studio or sql?

    • @akiavi0812
      @akiavi0812 5 лет назад

      @@SuperSunny92 Content-Type:application/json already added but still getting null

    • @akiavi0812
      @akiavi0812 5 лет назад

      Can you please help me

    • @SaiKumar-rv2ye
      @SaiKumar-rv2ye 5 лет назад

      Akash Deep did you give all the parameters mentioned in the video ?

    • @akiavi0812
      @akiavi0812 5 лет назад

      @@SaiKumar-rv2ye yes

  • @krishnagoriparthi4570
    @krishnagoriparthi4570 4 года назад

    any body can help me in post implementation is not working while using fiddler

  • @LarrzoneSolutions
    @LarrzoneSolutions Год назад

    I wish you made a corresponding HTML User interface to accommodate the code

  • @kashiffayyaz6004
    @kashiffayyaz6004 8 лет назад

    best tutorials

  • @kavithavishwanathen6778
    @kavithavishwanathen6778 8 лет назад

    Thank you Sir !!!!!!

  • @hendesebilisim
    @hendesebilisim 7 лет назад

    thank you sir

  • @thanhhung777
    @thanhhung777 6 лет назад

    Thank you !

  • @saurabhmishra-rv7sw
    @saurabhmishra-rv7sw Год назад

    Can any one tell me how can we send the file along with data.

  • @bavanimayan8556
    @bavanimayan8556 3 года назад

    Sometimes u have added code in end of the page.. We couldn't see that, because of subtitle.... 🙁☹️☹️

  • @SuperArvindPandey
    @SuperArvindPandey 8 лет назад

    your article is very great full , but please sir change visual studio skin format like a blue or white. bcoz not visiable properly

    • @thagerm2390
      @thagerm2390 7 лет назад +1

      Please ignore this. No offense Arvind, but I MUCH prefer this darker skin. I'm not certain what issue he is having, but it looks great for me.

    • @suateca4174
      @suateca4174 7 лет назад

      Dark skin they say that is better to the our sight

  • @durpinthapamagar
    @durpinthapamagar 5 лет назад

    Transport
    Location: localhost:49936/api/employees11
    why isn't there a / between employees and 11 in fiddler
    reply fast plz!!!

  • @professorchen3383
    @professorchen3383 4 года назад

    for more headers look at http.cat!!

  • @waqasjavaid9274
    @waqasjavaid9274 6 лет назад

    black skin is bad in viewing :-(

  • @waliuzzaman9008
    @waliuzzaman9008 8 лет назад

    you are boss

  • @belmiris1371
    @belmiris1371 2 года назад

    Thank you!