예제 #1
0
        public bool UpdateEstado(TipoEstadoDTOs tipoestado)
        {
            var entity = new TipoEstado()
            {
                Id   = tipoestado.Id,
                Tipo = tipoestado.Tipo
            };

            return(_repository.Update <TipoEstado>(entity));
        }
예제 #2
0
        public TipoEstado CrearTipoEstado(TipoEstadoDTOs tipo)
        {
            var entity = new TipoEstado()
            {
                Tipo = tipo.Tipo
            };

            _repository.Add(entity);
            return(entity);
        }
예제 #3
0
        public IActionResult Update(TipoEstadoDTOs tipoestado)
        {
            try
            {
                return new JsonResult(_service.UpdateEstado(tipoestado)) { StatusCode = 200 };
            }
            catch (Exception e)
            {

                return BadRequest(e.Message);
            }
        }