Esempio n. 1
0
        public async Task <ActionResult <Brand> > PostBrand(Brand brand)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            var userId = HttpContext.User.Claims.First().Value;

            _IBrand.Add(brand);
            await _IBrand.SaveAsync();

            return(Ok(brand));
        }
Esempio n. 2
0
 public bool Add(E_Model.Brand model)
 {
     return(dal.Add(model));
 }