Пример #1
0
        // DELETE api/<controller>/5
        public IActionResult Delete([FromBody] dto_Privillige Model)
        {
            GenericResponse response = new GenericResponse();

            response.FillSuccess();
            _service_Privillige.Remove(Model);
            response.data = Model;
            return(Ok(response));
        }
Пример #2
0
        // POST api/<controller>
        public IActionResult Create([FromBody] dto_Privillige Model)
        {
            GenericResponse response = new GenericResponse();

            if (ModelState.IsValid)
            {
                response.FillSuccess();
                FillBase(Model);
                _service_Privillige.CreateOREdit(Model);
                response.data = Model;
            }
            else
            {
                response.FillError();
            }
            return(Ok(response));
        }