Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. post list of products instead of single product in post method odata

post list of products instead of single product in post method odata

Scheduled Pinned Locked Moved ASP.NET
tutorialquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Asif Rehman
    wrote on last edited by
    #1
       // POST: odata/Products
        public IHttpActionResult Post(\[FromBody\]  product Products)
        {
            ...
        }
    
       // POST: odata/Products
        public IHttpActionResult Post(\[FromBody\]  List Products)
        {
            ...
        }
    

    when I used List I got empty products. How to handle it?

    D Richard DeemingR 2 Replies Last reply
    0
    • A Asif Rehman
         // POST: odata/Products
          public IHttpActionResult Post(\[FromBody\]  product Products)
          {
              ...
          }
      
         // POST: odata/Products
          public IHttpActionResult Post(\[FromBody\]  List Products)
          {
              ...
          }
      

      when I used List I got empty products. How to handle it?

      D Offline
      D Offline
      dan sh
      wrote on last edited by
      #2

      Can you update your question with code where you are posting the data?

      "It is easy to decipher extraterrestrial signals after deciphering Javascript and VB6 themselves.", ISanti[^]

      1 Reply Last reply
      0
      • A Asif Rehman
           // POST: odata/Products
            public IHttpActionResult Post(\[FromBody\]  product Products)
            {
                ...
            }
        
           // POST: odata/Products
            public IHttpActionResult Post(\[FromBody\]  List Products)
            {
                ...
            }
        

        when I used List I got empty products. How to handle it?

        Richard DeemingR Offline
        Richard DeemingR Offline
        Richard Deeming
        wrote on last edited by
        #3

        You already posted this yesterday: How to post array of objects to oData - Web Development Discussion Boards[^]


        "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

        "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups