示例#1
0
        public async Task <IActionResult> Update(Oryx.Content.Model.Banners model)
        {
            var apiMsg = await ApiMessage.Wrap(async() =>
            {
                await bannersBusienss.Update(model);
            });

            return(Json(apiMsg));
        }
示例#2
0
        public async Task <IActionResult> New(Oryx.Content.Model.Banners model)
        {
            var apiMsg = new ApiMessage();

            try
            {
                await bannersBusienss.Add(model);
            }
            catch (Exception exc)
            {
                apiMsg.SetFault(exc);
            }
            return(Json(apiMsg));
        }