Exemple #1
0
 public IHttpActionResult Create(Brands model)
 {
     if (ModelState.IsValid)
     {
         var createBrand = brandDal.Create(model);
         return(CreatedAtRoute("DefaultApi", new { id = createBrand.Id }, createBrand));
     }
     else
     {
         return(BadRequest(ModelState));
     }
 }