示例#1
0
        public IActionResult Post([FromBody] StoreViewModel ViewModel)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ViewModel));
            }

            try
            {
                _appService.Insert(ViewModel);

                return(Ok(ViewModel));
            }
            catch (Exception)
            {
                return(BadRequest(ViewModel));
            }
        }