Ejemplo n.º 1
0
        protected OkObjectResult ExecutionFailed()
        {
            CustomResponseModel model = new CustomResponseModel
            {
                Data    = Array.Empty <object>(),
                Message = "Execution un-Successfull",
                Status  = false
            };

            return(base.Ok(model));
        }
Ejemplo n.º 2
0
        public override OkObjectResult Ok([ActionResultObjectValue] object value)
        {
            CustomResponseModel model = new CustomResponseModel
            {
                Data    = value,
                Message = "Data Found",
                Status  = true
            };

            return(base.Ok(model));
        }
Ejemplo n.º 3
0
        protected OkObjectResult Ok <T>([ActionResultObjectValue] IEnumerable <T> value)
        {
            var model = new CustomResponseModel <IEnumerable <T> >
            {
                Data    = value,
                Message = "Data Found",
                Status  = true
            };

            return(base.Ok(model));
        }
Ejemplo n.º 4
0
        protected new OkObjectResult Ok()
        {
            CustomResponseModel model = new CustomResponseModel
            {
                Data    = Array.Empty <object>(),
                Message = "Execution Successfull",
                Status  = true
            };

            return(base.Ok(model));
        }
Ejemplo n.º 5
0
        protected OkObjectResult NoDataFound()
        {
            var value = Array.Empty <object>();
            CustomResponseModel model = new CustomResponseModel
            {
                Data    = value,
                Message = "No Data Found",
                Status  = true
            };

            return(base.Ok(model));
        }
Ejemplo n.º 6
0
        protected OkObjectResult Error(string errorMessage)
        {
            var value = Array.Empty <object>();
            CustomResponseModel model = new CustomResponseModel
            {
                Data    = value,
                Message = errorMessage,
                Status  = false
            };

            return(base.Ok(model));
        }
Ejemplo n.º 7
0
        protected OkObjectResult DataUpdated()
        {
            var value = Array.Empty <object>();
            CustomResponseModel model = new CustomResponseModel
            {
                Data    = value,
                Message = "Data has been Updated successfully",
                Status  = true
            };

            return(base.Ok(model));
        }