Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [HttpPost]
- public ActionResult<Panels> CreateNewPanel(Panels panel)
- {
- _context.Panels.Add(panel);
- _context.SaveChanges();
- return CreatedAtAction(nameof(GetPanelById), new { id = panel.ID }, panel);
- }
- {
- "desc": "test5",
- "frame": 2,
- "aC240v": false
- }
- public class Panels
- {
- public int ID { get; set; }
- public string Desc { get; set; }
- public PanelFrames Frame { get; set; }
- public bool AC240v { get; set; }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement