Exemple #1
0
        public IActionResult Post([FromBody] FemaleModelModel model)
        {
            if (model == null)
            {
                return(BadRequest());
            }

            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }
            model.Image     = GeneralStaticdata.chosenimage;
            model.imagepath = GeneralStaticdata.ImagePath;
            GeneralStaticdata.chosenimage = null;
            GeneralStaticdata.ImagePath   = null;
            return(Created("femalemodel", _dataService.AddFemaleModelReturnType(model)));
        }