コード例 #1
0
        public async Task <ActionResult <Response> > GetMenuBar(int Tipo, int Id1, int Id2)
        {
            Response response = new Response();
            object   rpta     = new object();

            try
            {
                if (!ModelState.IsValid)
                {
                    return(BadRequest(ModelState));
                }

                rpta = await _muratserviceslogic.GetMenuBar(Tipo, Id1, Id2);

                if (rpta == null)
                {
                    return(NotFound());
                }
            }
            catch (Exception e)
            {
                response.Status  = Error500;
                response.Message = e.Message;
                return(Ok(response));
            }
            return(Ok(rpta));
        }
コード例 #2
0
        public async Task <ActionResult <Response> > GetMenuBar(int Tipo, int Id1, int Id2)
        {
            object rpta = new object();

            try
            {
                rpta = await _muratserviceslogic.GetMenuBar(Tipo, Id1, Id2);

                if (rpta == null)
                {
                    return(NotFound());
                }
            }
            catch (Exception e)
            {
                Response response = new Response();
                response.Status  = Constant.Error500;
                response.Message = e.Message;
                return(Ok(response));
            }
            return(Ok(rpta));
        }