public void EliminarRgParamRegGeral(int _CodEmpr)
        {
            RgParamRegGeral _Result = null;

            _Result = DAO.FindByPrimaryKey(_CodEmpr);

            DAO.Delete(_Result);
            DAO.UnitOfWork.Commit();
        }
        public IHttpActionResult Put(RgParamRegGeral _RgParamRegGeral)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            BO.AlterarRgParamRegGeral(_RgParamRegGeral);

            return(Updated(_RgParamRegGeral));
        }
        public IHttpActionResult Post(RgParamRegGeral _RgParamRegGeral)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            BO.AdicionarRgParamRegGeral(_RgParamRegGeral);

            return(Created(_RgParamRegGeral));
        }
        public IHttpActionResult Patch(RgParamRegGeral _RgParamRegGeral)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            Delta <RgParamRegGeral> _Delta = new Delta <RgParamRegGeral>();

            _Delta.CopyChangedValues(_RgParamRegGeral);

            _Delta.Patch(_RgParamRegGeral);
            return(Updated(_RgParamRegGeral));
        }
 public void AlterarRgParamRegGeral(RgParamRegGeral _RgParamRegGeral)
 {
     DAO.Update(_RgParamRegGeral);
     DAO.UnitOfWork.Commit();
 }
 public void AdicionarRgParamRegGeral(RgParamRegGeral _RgParamRegGeral)
 {
     DAO.Insert(_RgParamRegGeral);
     DAO.UnitOfWork.Commit();
 }
        public RgParamRegGeral RecuperaRgParamRegGeral(int _CodEmpr)
        {
            RgParamRegGeral _Result = DAO.RecuperarRgParamRegGeral(_CodEmpr);

            return(_Result);
        }
        public IHttpActionResult Get([FromODataUri] int CodEmpr)
        {
            RgParamRegGeral _Result = BO.RecuperaRgParamRegGeral(CodEmpr);

            return(Ok(_Result));
        }