public String PostDealership([FromBody] Dealership dealership)
        {
            dealershipMgr.Post(dealership);


            return("Dealership has been added");
        }
Ejemplo n.º 2
0
 public async Task <IActionResult> Create([Bind("ID,Name,Email,Phone")] Dealership dealership)
 {
     if (ModelState.IsValid)
     {
         DealershipMgr.Post(dealership);
         return(RedirectToAction(nameof(Index)));
     }
     return(View(dealership));
 }
Ejemplo n.º 3
0
 public IActionResult Create([Bind("ID,Name,Email,PhoneNumber")] Dealership dealership)
 {
     if (ModelState.IsValid)
     {
         _contextDmgr.Post(dealership);
         return(RedirectToAction(nameof(Index)));
     }
     return(View(dealership));
 }
Ejemplo n.º 4
0
        public IActionResult Post([FromBody] Dealership dealership)
        {
            _contextDmgr.Post(dealership);

            return(Ok());
        }
Ejemplo n.º 5
0
        public void Post([FromBody] JObject value)
        {
            Dealership dealership = value.ToObject <Dealership>();

            DealershipMgr.Post(dealership);
        }
Ejemplo n.º 6
0
 public void Post([FromBody] string dealership)
 {
     _dealershipMgr.Post(JsonConvert.DeserializeObject <Dealership>(dealership));
 }