Exemplo n.º 1
0
        public async Task <string> AysUpUserTalk(SnUserTalk talk)
        {
            int da = await CreateService <SnUserTalk>().UpdateAsync(talk);

            string data = da == 1 ? "更新成功" : "更新失败";

            return(data);
        }
Exemplo n.º 2
0
        [Authorize(Roles = "kai")] //角色授权
        public async Task <IActionResult> AysUpUserTalk(SnUserTalk talk)
        {
            var data = await _service.AysUpUserTalk(talk);

            return(Ok(data));
        }
Exemplo n.º 3
0
 /// <summary>
 /// 添加数据
 /// </summary>
 /// <param name="talk"></param>
 /// <returns></returns>
 public async Task <SnUserTalk> AsyInsUserTalk(SnUserTalk talk)
 {
     return(await CreateService <SnUserTalk>().AddAsync(talk));
 }
Exemplo n.º 4
0
 [Authorize(Roles = "kai")] //角色授权
 public async Task <ActionResult <SnUserTalk> > AsyInsUserTalk(SnUserTalk talk)
 {
     return(Ok(await _service.AsyInsUserTalk(talk)));
 }