Exemplo n.º 1
0
        public async Task <string> AysUpVideo(SnVideo test)
        {
            try
            {
                int da = await CreateService <SnVideo>().UpdateAsync(test);

                string data = da == 1 ? "更新成功" : "更新失败";
                return(data);
            }
            catch (Exception e)
            {
                return("异常:" + e.Message);
            }
        }
Exemplo n.º 2
0
        [Authorize(Roles = "kai")] //角色授权
        public async Task <IActionResult> AysUpVideo(SnVideo test)
        {
            var data = await _service.AysUpVideo(test);

            return(Ok(data));
        }
Exemplo n.º 3
0
 [Authorize(Roles = "kai")] //角色授权
 public async Task <ActionResult <SnVideo> > AsyInsVideo(SnVideo test)
 {
     return(Ok(await _service.AsyInsVideo(test)));
 }
Exemplo n.º 4
0
 public async Task <SnVideo> AsyInsVideo(SnVideo test)
 {
     return(await CreateService <SnVideo>().AddAsync(test));
 }