示例#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));
        }
示例#2
0
文件: Brand.cs 项目: kencentre/X-Wcf
 public bool Add(E_Model.Brand model)
 {
     return(dal.Add(model));
 }