SHARE
TWEET

Untitled

a guest Jul 17th, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. [HttpPost]
  2. public ActionResult<Panels> CreateNewPanel(Panels panel)
  3. {
  4.  
  5.     _context.Panels.Add(panel);
  6.     _context.SaveChanges();
  7.  
  8.     return CreatedAtAction(nameof(GetPanelById), new { id = panel.ID }, panel);
  9. }
  10.      
  11. {
  12.         "desc": "test5",
  13.         "frame": 2,
  14.         "aC240v": false
  15.     }
  16.      
  17. public class Panels
  18.     {
  19.         public int ID { get; set; }
  20.         public string Desc { get; set; }
  21.  
  22.         public PanelFrames Frame { get; set; }
  23.  
  24.         public bool AC240v { get; set; }
  25.  
  26.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top